Text or binary
If the decoded bytes are valid UTF-8 text they are shown directly. Images, PDFs and other binary data are detected and offered as a file download.
Decode Base64 back to readable text – or convert Base64 to an image, PDF or other downloadable file when it contains binary data – and encode any text to Base64. Unicode is handled as UTF-8.
If the decoded bytes are valid UTF-8 text they are shown directly. Images, PDFs and other binary data are detected and offered as a file download.
Whitespace and line breaks are ignored, missing = padding is added, and
data: URL prefixes are stripped automatically.
Base64URL – used in JWTs and URLs – replaces + and / with -
and _. Both variants are decoded without any settings.
Text is converted to UTF-8 bytes before encoding, so æ, ø, å, Arabic and emoji round-trip correctly.
Base64 turns every 3 bytes into 4 characters from the alphabet A–Z a–z 0–9 + /.
When the input isn't a multiple of 3 bytes, = pads the output to a multiple of 4 characters.
| Input | Base64 | Notes |
|---|---|---|
abc | YWJj | 3 bytes become exactly 4 characters – no padding. |
hello | aGVsbG8= | 5 bytes: one = of padding. |
hi | aGk= | 2 bytes: one = of padding. |
ø | w7g= | Encoded as its two UTF-8 bytes, C3 B8. |
bytes FB FF | +/8= | Standard Base64 – the URL-safe form is -_8. |
Files start with fixed "magic bytes", so their Base64 starts with a recognizable prefix. The decoder uses these signatures to name the downloaded file with the right extension.
| Base64 starts with | File type | Downloads as |
|---|---|---|
iVBORw0KGgo | PNG image | decoded.png |
/9j/ | JPEG image | decoded.jpg |
R0lGOD | GIF image | decoded.gif |
JVBERi0 | PDF document | decoded.pdf |
UEsDB | ZIP archive (also .docx, .xlsx, .jar) | decoded.zip |
H4sI | gzip archive | decoded.gz |
| anything else | Other binary data | decoded.bin |
Paste the Base64 string into the left field. The decoded text appears instantly on the right. If it contains binary data, use the download button to save it as a file.
Base64 only uses A–Z, a–z, 0–9, + and / (or - and _),
plus = padding at the end. Any other character, or a truncated string, makes it invalid.
No. Base64 is an encoding, not encryption. Anyone can decode it, so never use it to protect passwords or other secrets.
Paste the Base64 string or the complete data: URL. When the decoded bytes are a PNG,
JPEG, GIF, PDF, ZIP or gzip file, the tool says so and the Download file button saves it with the
right extension. To go the other way, use the Base64 file encoder.
Yes, one part at a time. A JWT is three Base64URL strings separated by dots: header, payload and signature. Paste the middle part to read the payload as JSON. Decoding does not verify the signature, so never trust a token just because it decodes.
That is padding. Base64 works on groups of 3 bytes; if the last group has only 1 or 2 bytes, the
output is filled up with == or =. URL-safe Base64 usually leaves it out,
and this decoder accepts both.