Base64 Decoder
Decode a Base64-encoded string back to its original text. Handles standard alphabet with padding. Unicode-aware.
0 characters
0 characters
About Base64 Decoder
Base64 decoding reverses the encoding: a Base64-encoded string is converted back to its original bytes, then those bytes are interpreted as UTF-8 to produce the original text. This tool whitespace-strips its input so encoded payloads broken across multiple lines decode correctly.
When to use it
- Reading a Base64-encoded HTTP Authorization header
- Recovering JSON from a data URI
- Inspecting the contents of a JWT (the payload is Base64URL — replace - with + and _ with / first)
- Decoding email attachments encoded as Base64
How it works
Whitespace and line breaks are stripped from the input. atob decodes the Base64 to bytes. The resulting byte sequence is decoded as UTF-8 via TextDecoder. Invalid Base64 surfaces as a decoder error.
Examples
SGVsbG8sIHdvcmxkIQ==
Hello, world!
Frequently asked questions
- What if my input is URL-safe Base64?
- Replace - with + and _ with / before pasting. URL-safe Base64 uses different characters that atob doesn't recognize.
- What if the input is missing padding?
- Strict Base64 requires '=' padding to a multiple of 4 characters. Most browsers' atob accepts unpadded input; the tool surfaces an error if it doesn't.
- What if the bytes aren't valid UTF-8?
- TextDecoder replaces invalid byte sequences with the Unicode replacement character (U+FFFD). To inspect raw bytes, use the hex-to-text tool with a hex representation instead.