Base64 Decode
Decode Base64 to text or check it for validity, with correct UTF-8 handling and automatic support for the URL-safe alphabet. Nothing is uploaded to a server.
Worked examples
- A standard Base64 string with padding
The everyday case: decoding a Base64 value copied from an API response, JWT segment or config file back to readable text.
- Multi-byte UTF-8 characters
Correct UTF-8 decoding matters — treating the bytes as Latin-1 or ASCII instead would corrupt accented letters and emoji.
- URL-safe Base64 without padding
URL-safe Base64 (from a JWT or a query parameter) uses - and _ in place of + and / and omits padding; this tool normalizes both forms automatically.
What this tool does
This tool reverses Base64 encoding: it takes a Base64 string and decodes it back to the original UTF-8 text, entirely in your browser. It accepts both the standard alphabet (+, /, = padding) and the URL-safe alphabet (-, _, no padding) automatically, so you don't need to know which variant you're looking at before pasting it in.
When you need it
- Reading a Base64 value copied from an API response, a JWT segment, a config file, or an
Authorization: Basicheader back to plain text. - Checking what's actually inside a Base64 string before trusting it — a quick way to confirm a token or payload contains what you expect.
- Debugging a webhook or integration that sends Base64-encoded fields, where you need to see the decoded value to diagnose a problem.
Rules the decoder applies
- Both Base64 alphabets are accepted without you specifying which one it is. The
-and_characters from URL-safe Base64 are normalized to+and/internally before decoding, and missing padding is added automatically. - Whitespace is stripped before decoding, since Base64 pasted from an email or a line-wrapped source sometimes has line breaks inserted at fixed intervals.
- Input is validated against the Base64 character set first. Text containing characters outside the alphabet (or with an invalid length) is rejected with a clear error rather than silently producing garbage output.
- Decoded bytes are interpreted as UTF-8 text. If the bytes aren't valid UTF-8 — which happens when the Base64 actually encodes binary data like an image rather than text — the tool reports that explicitly instead of showing corrupted characters.
Why you might see a UTF-8 error
Base64 can encode any bytes at all, not just text — images, PDFs, encryption keys and other binary formats are all commonly Base64-encoded for the same "safe to put in plain text" reason. When you decode Base64 that actually holds binary data, the resulting bytes usually aren't valid UTF-8, so this tool reports the mismatch rather than displaying mojibake. That error is itself useful information: it tells you the Base64 string you're looking at is binary data, not encoded text, and you'd need a different tool (one that can output a downloadable file) to work with it.
Things to check after decoding
- If the decoded text looks like it's missing characters or has odd substitutions, double-check you copied the entire Base64 string — a single dropped character shifts every subsequent group of four and corrupts the rest of the decode.
- Remember decoding isn't decryption: if the original value was Base64-encoded and encrypted, decoding only undoes the encoding step, and you'll see encrypted bytes (or a UTF-8 error) rather than the original plaintext.
Limits
Input is capped at 2 MB of Base64 text. This tool outputs text — if you're decoding a Base64 string that represents an image or other binary file, you'll need a tool designed to reconstruct and download that file type instead.
Frequently asked questions
- Is my Base64 uploaded anywhere?
- No. Decoding runs entirely in your browser; nothing is sent to a server.
- Does this accept URL-safe Base64?
- Yes — the - and _ characters used by URL-safe Base64 (common in JWTs) are normalized automatically before decoding.
- What happens if the input isn't valid Base64?
- The tool reports that the text contains characters outside the Base64 alphabet or has invalid length instead of guessing at a result.
- Why do I get a UTF-8 error on decode?
- That means the decoded bytes aren't valid UTF-8 text — likely because the Base64 actually encodes binary data (an image or file) rather than text.