Skip to main content
Developer Tool

Base64 Encoder / Decoder Online

Encode text to Base64 or decode it back, accents and emoji included, including the URL-safe Base64 of tokens, or turn an image into a data URI.

Your text
Result

The result will appear here

Learn more

Base64: what to know

Where you meet Base64

Email attachments, data URIs in HTML and CSS, HTTP Basic auth headers, JWT segments, Kubernetes secrets, binary fields in JSON: all carry data as Base64 text. Decode one to see what it holds, or encode a value to paste where only plain text is allowed.

Variants, UTF-8 and binary data

The decoder takes standard and URL-safe Base64 (- and _ instead of + and /, as in JWTs), with or without = padding, split over several lines. Text is read as UTF-8, so accents and emoji come back intact; when the content is a file (an image, a PDF) rather than text, the tool says so. Base64 is an encoding, not encryption: anyone can decode it.

How Base64 encoding works

Base64 takes groups of 3 bytes (24 bits) and splits them into 4 groups of 6 bits. Each 6-bit group maps to one of 64 printable ASCII characters. When the input length is not divisible by 3, padding characters (=) are added.

For example, the text "Hi" (2 bytes: 0x48 0x69) becomes "SGk=" in Base64. The = padding indicates one byte of padding was needed to complete the last group.

Base64 vs Base64url

Standard Base64 uses + and / characters, which have special meaning in URLs. Base64url replaces these with - and _ respectively, making it safe for use in URLs and filenames without additional encoding.

JWT tokens, for instance, use Base64url. To encode a value for a URL or a file name, turn on the URL-safe switch: the result uses - and _ and drops the = padding. The decoder reads both variants without any setting.

How it works

Base64 Encoder/Decoder in 3 steps

  1. Choose your mode

    Select "Text ↔ Base64" to convert text, or "Image to Base64" to convert an image file into a Data URI.

  2. Enter or drop your content

    For text mode, paste your text or Base64 string. For image mode, drag and drop an image file or click to browse.

  3. Copy the result

    The result appears as you type; copy it with the Copy button. For images, you can copy the full Data URI or just the Base64 string.

Practical guides

Get the most out of Base64 encoding

How it works

Encode text to Base64 or decode Base64 back to text, with full UTF-8 support (accents, emoji, any language), or turn an image into a Data URI.

The decoder accepts standard and URL-safe Base64 (as in JWT), with or without = padding, split over several lines, and tells you when the data is a file rather than text.

Quick & easy

Privacy & security

Your files and data never leave your device. All processing is done client-side in the browser.

Auth headers and secrets are often Base64: decoding them here never sends them anywhere.

Runs in your browser
Frequently asked questions

Base64 Encoder/Decoder — FAQ

Everything you need to know about our base64 encoder/decoder