Base64 Decode
Decode Base64 or Base64url back to text, with clear errors for invalid input, data: URI prefixes skipped, and a hex view for binary data.
How to use this tool
Steps for using the Base64 Encoder.
- Decode is selected. Paste Base64 or Base64url into the input panel — the decoded text appears as you type.
- Spaces and line breaks are ignored, missing
=padding is accepted and a leadingdata:…;base64,prefix is skipped, so you can paste values from PEM files, emails or HTML as they are. - If the bytes aren't valid UTF-8 text — an image or compressed data — a hex dump is shown and you can save the raw bytes with Download .bin. Turn on Show as hex to see any result as hex.
- Invalid input is reported with the exact character position. Use Use output as input to re-encode the result.
Example
UTF-8 text with an emoji
R3LDvMOfZSDwn5GLGrüße 👋Common use cases
- Reading Base64 values from APIs, logs, Kubernetes Secrets and environment variables.
- Decoding the header and payload of a JWT — or use the JWT Decoder for a structured view.
- Checking what an HTTP Basic
Authorizationheader contains. - Extracting the bytes from a
data:URI to see what file it holds.
How Base64 is decoded
Decoding reverses encoding: each character maps back to 6 bits, every 4 characters become 3 bytes, and = padding tells the decoder how many bytes the last group really holds. Those bytes are then read as UTF-8 text.
The decoder here is forgiving about format but strict about content. It accepts both the standard (+/) and URL-safe (-_) alphabets, ignores whitespace and line breaks, skips a data:…;base64, prefix and decodes input with missing padding — SGVsbG8 decodes to “Hello”.
Anything that can't be valid Base64 is rejected with its position: characters outside the alphabets, = in the middle of the data, or a length that can't correspond to whole bytes. That makes it easy to spot a value that was cut off or corrupted when it was copied.
After decoding, the bytes are checked with a strict UTF-8 decoder. Images, archives and encrypted data aren't text, so instead of a screen of replacement characters you get a hex dump — the PNG example above starts with the familiar 89 50 4e 47 signature. To create Base64, use Base64 Encode.
Limitations
- Input up to 2,000,000 characters; decode larger Base64 on the command line (
base64 -d). - Text is decoded as UTF-8; other encodings such as UTF-16 or Windows-1252 appear as hex.
- The hex dump shows the first 64 KB of binary data; Download .bin saves all of it.
Frequently asked questions
Why does my decoded text look like garbage?
The data probably isn't UTF-8 text — it may be an image, compressed data or text in another encoding. This page shows such data as a hex dump; look at the first bytes to recognise the file type.
Can I decode Base64 without padding?
Yes. Missing = padding is accepted, with a note that the input had none. Too much padding, or = in the middle, is reported as an error.
How do I decode Base64url?
Just paste it — - and _ are accepted alongside + and /, and the usual missing padding is fine.
Is decoding done on a server?
No. Decoding runs entirely in your browser, so tokens and secrets you paste aren't sent anywhere.