Base64 Decoder
Decode Base64 and Base64URL to text. Whitespace, missing padding and data URI prefixes are handled, and errors name the exact character.
Base64 Decoder: the tool
Input
Decoded
The result appears here.How to use Base64 Decoder
- Paste the Base64 string. Both the standard and the URL-safe alphabet are accepted, with or without = padding.
- Line breaks and spaces are ignored, and a leading data:...;base64, prefix is removed for you.
- Choose Text if the data is UTF-8 text, or Hex to see the raw bytes of binary data.
- If the input is not valid Base64, the message shows the position of the first bad character. Use Go to error to jump to it.
Example
A Base64 string with the padding omitted, as it appears in URL-safe formats. It decodes to a short text with an accent and an emoji.
SMOpbGxvLCBDb2Rldm9yeSEg8J-Riw
Héllo, Codevory! 👋
About this tool
Base64 decoding reverses the encoding: every 4 characters become 3 bytes. Whether those bytes are readable text depends on what was encoded. A JSON document, a configuration value or an email body decodes to text, while an image or an archive decodes to binary data.
When the bytes are not valid UTF-8, the tool says so instead of showing garbage characters, and the Hex option lets you inspect them. This usually means the original data was binary, or was encoded with a legacy character set such as Latin-1.
Decoding happens in your browser. The string you paste, which may contain tokens or credentials, is never sent to a server.
Frequently asked questions
Why do I get "not valid UTF-8" after decoding?
The decoded bytes are not text in UTF-8. They may be a binary file such as an image, a compressed or encrypted payload, or text in an older encoding. Switch the output to Hex to look at the bytes.
Does the decoder accept Base64URL?
Yes. The characters - and _ are read as + and /, and missing padding is accepted, so JWT segments and URL-safe values decode directly.
What does "one character is left over" mean?
Valid Base64 never has a length of 4n + 1 characters, so something was cut off or added. Check that the whole value was copied and that no extra characters were included.
Can this tool decode a JWT?
It can decode each of the three segments one at a time. The JWT decoder does this for you and also shows the claims in readable form.
Is the decoded text sent anywhere?
No. Decoding runs in your browser, and nothing is uploaded or stored.
More developer tools
- b64Base64 EncoderEncode text to Base64 in your browser. Handles Unicode, the URL-safe alphabet and MIME line wrapping.
- jwtJWT DecoderDecode a JSON Web Token locally to read its header, payload and claims. It does not verify the signature, so a decoded token is never reported as valid.
- %20URL DecoderDecode percent-encoded URLs and query strings back to readable text, with exact errors for malformed sequences.
- { }JSON Formatter & ValidatorFormat, validate and minify JSON. Errors point to the exact line and column, and nothing you paste leaves your browser.