Decode standard Base64 into UTF-8 text in your browser.
Scope
The decoder expects standard Base64 representing UTF-8 text. Arbitrary binary Base64 may not decode into readable text.
Decoding Base64 does not determine whether the decoded content is safe or trustworthy.
How to decode text
- Paste standard Base64 without a data-URL prefix.
- Select Decode Base64 and review the resulting text.
- Select Copy to decode and copy the current input.
For example, SGVsbG8= decodes to Hello. Whitespace in the encoded input is ignored. Missing trailing padding is accepted when the browser can decode it. Empty input gives empty output.
Why does decoding fail?
Invalid Base64 characters, malformed padding or bytes that are not valid UTF-8 produce an error. This tool expects the standard plus/slash alphabet, not the dash/underscore Base64url alphabet used by some tokens. It does not decode a whole JWT, strip data-URL headers or reconstruct binary files such as PDFs and images.
The limit is 1,100,000 input string units. A leading UTF-8 byte order mark is preserved in the output, even though it is normally invisible. Line endings displayed in a browser textarea may be normalized. Use the Base64 Encoder for text-to-Base64 conversion. See RFC 4648 for the standard alphabet.
Related tools
How Base64 decoding works
Base64 is a way to write binary data using only 64 printable characters: A–Z, a–z, 0–9, plus + and /, with = used as padding. Each Base64 character stands for 6 bits. Decoding reverses the encoding: every group of four characters becomes 24 bits, which are split back into three 8-bit bytes. This decoder then reads those bytes as UTF-8 text.
TWFu is four characters. Their alphabet positions are T = 19, W = 22, F = 5 and u = 46. Written as 6-bit groups, that is 010011 010110 000101 101110. Regrouped into bytes, it becomes 01001101 01100001 01101110, which are the byte values 77, 97 and 110, the UTF-8 letters Man.Padding and output length
Because four characters always carry three bytes, a complete Base64 string has a length that is a multiple of four. When the original data is not a multiple of three bytes, the encoder adds one or two = signs. Each = means the last group carries one byte less:
SGk=(one=) decodes to two bytes: Hi.SGVsbG8sIHdvcmxk(no padding) decodes to twelve bytes: Hello, world.- Decoded size in bytes = 3 × (characters ÷ 4) − number of
=signs.
The reverse is also useful: Base64 text is about one third larger than the data it represents, because every 3 bytes become 4 characters. That is why images embedded as Base64 are larger than the original files.
Text bytes are not the same as characters
The decoder shows text, but Base64 stores bytes. Plain English letters use one byte each in UTF-8, while accented letters, many scripts and emoji use two to four bytes. For example, Y2Fmw6k= decodes to café: four characters, but five bytes, because é takes two. If the bytes were produced in another encoding, such as Windows-1252 or UTF-16, they may not form valid UTF-8, and the decoder reports an error instead of showing garbled text.
Where you will meet Base64
- Data URLs, such as
data:image/png;base64,…. Remove everything up to and including the comma before decoding, and remember that the result is image data, not text. - Email attachments (MIME), where Base64 is wrapped into lines of up to 76 characters. Line breaks are ignored here, so you can paste wrapped text directly.
- JSON Web Tokens and URLs, which use the Base64url alphabet. Replace
-with+and_with/, add=until the length is a multiple of four, then decode one token segment at a time. - Configuration files and HTTP Basic authentication headers, where short credentials or settings are stored as Base64.
Anyone can decode Base64 without a key. If a decoded value contains a password, token or personal data, treat it as exposed and handle it carefully. Avoid pasting live production secrets into any website you do not control.
Frequently asked questions
What does the equals sign at the end of Base64 mean?
It is padding. One = means the final four-character group holds two bytes, and two == means it holds one byte. Padding keeps the total length a multiple of four.
Why do I get an error when decoding?
Common causes are characters outside the standard alphabet (such as – or _ from Base64url), a data-URL prefix left in the input, broken padding, or bytes that are not valid UTF-8 text, such as an image or compressed file.
How do I decode Base64url, for example from a JWT?
Take one segment of the token (the parts are separated by dots), replace – with + and _ with /, add = until the length is a multiple of four, and paste the result. The header and payload of a JWT are usually JSON text.
Is Base64 a form of encryption?
No. Base64 only changes how data is written. It hides nothing, and anyone can decode it instantly. Use real encryption to protect sensitive information.
How much bigger is Base64 than the original data?
About 33%. Every 3 bytes become 4 characters, and padding can add up to two more characters at the end. Line breaks in wrapped formats such as email add a little more.
Can I decode a Base64 image or PDF here?
This page converts Base64 to text only. Image, PDF and other binary data will usually fail the UTF-8 check. Use a tool that saves the decoded bytes as a file for those formats.