EthicalFusion

Base64 Decoder

Decode Base64 strings back to readable text.

Was this tool helpful?

Thanks for the feedback!

This Base64 Decoder turns an encoded string such as SGVsbG8= back into the text it came from. It rebuilds the original bytes and reads them as UTF-8, so Hindi, Tamil, emoji and symbols like ₹ come back intact instead of as broken characters. Paste the string, press Decode, and copy the result.

How Base64 decoding works

Base64, defined in RFC 4648, writes binary data using 64 safe characters: A–Z, a–z, 0–9, + and /. Each character stands for 6 bits, so every group of four characters holds 24 bits, which is exactly three bytes. Decoding simply reverses that mapping. One or two = signs at the end are padding: they tell the decoder that the final group carried only two bytes or one byte.

After the bytes are rebuilt, the tool interprets them as UTF-8 text. That second step is why a string like 4oK5NTAw decodes to ₹500: the rupee sign is stored as three bytes (E2 82 B9), and a plain byte-by-byte decoder would show them as three odd Latin characters.

Examples you can paste to test it

Base64 inputDecoded text
SGVsbG8sIFdvcmxkIQ==Hello, World!
4oK5NTAw₹500
4KSo4KSu4KS44KWN4KSk4KWHनमस्ते
dXNlcjpwYXNzuser:pass

The last row is typical of an HTTP header such as Authorization: Basic dXNlcjpwYXNz. Copy only the part after the word "Basic" and you get the username and password separated by a colon, which shows how little protection Base64 offers on its own.

What the decoder accepts and what it rejects

  • Spaces and line breaks are ignored, so Base64 copied from an email source that wraps every 76 characters decodes fine.
  • Missing padding is tolerated: SGVsbG8 still gives "Hello".
  • URL-safe Base64 (the variant with - and _, used in JWTs and many URLs) is rejected. Replace - with + and _ with / first, or use the JWT Decoder for tokens.
  • Prefixes such as Basic or data:text/plain;base64, must be removed, because the colon, comma and space are not Base64 characters.
  • Binary files such as images, PDFs or ZIP archives can't be shown as text. Their bytes are not valid UTF-8, so you'll see "Invalid Base64 input" rather than a screen of garbage.

Troubleshooting odd results

If the output decodes without an error but still looks like Base64, the data was probably encoded twice; run the result through the decoder again. If you get an error on a string that looks correct, check the length: after removing whitespace, a valid string never leaves exactly one character in its last group, so a length that is one more than a multiple of four usually means something was cut off while copying. Stray quote marks from JSON or code are another common cause, so paste only the value between the quotes. Decoding runs in your browser with JavaScript's built-in atob function, so the string isn't uploaded. To go the other way, use the Base64 Encoder.

Frequently asked questions

Why do I get "Invalid Base64 input"?
The string most likely contains characters outside the standard alphabet, such as - and _ from URL-safe Base64, quotes, or a prefix like "Basic". It can also mean the decoded bytes are binary data rather than UTF-8 text.
Can I decode a Base64 image with this tool?
No. The tool only outputs text, and image bytes are not readable text, so it shows an error. Paste the data URI into a browser address bar instead to view the image.
Is Base64 a form of encryption?
No. It is an encoding with no key, so anyone can reverse it in seconds. Never rely on it to hide passwords or personal data.
Does the string need = padding at the end?
Not here. The decoder accepts strings with the trailing = signs removed, which is common in URLs and tokens.
How do I decode Base64URL from a JWT or link?
Swap every - for + and every _ for /, then decode. For a complete JWT, the JWT Decoder does this for you and formats the JSON.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.