Base64 Encoder and Decoder

Enter text to encode or standard Base64 to decode to UTF-8 text.

Your input stays in your browser.

Last reviewed

Use the Base64 encoder for text fields

The Base64 encoder turns UTF-8 text into characters that can pass through systems that expect Base64. Paste text and select Encode to get the encoded representation. Paste standard Base64 that contains UTF-8 text and select Decode to get the message back. The tool works on the text you enter and leaves it in the editable box so you can use the reverse operation.

See what happens to one letter

The letter A is written as one UTF-8 byte, with decimal value 65. Encoding that byte gives QQ== in standard Base64. The equals signs are padding. Decode QQ== and you get A again. A non-ASCII character can use multiple bytes in UTF-8. For example, the single character é takes two bytes and encodes as w6k=. The number of characters alone does not determine the encoded length.

Check the variant expected by the destination

Standard Base64 uses plus and slash among its symbols, and it can end with equals signs. A field that specifically asks for Base64url may expect different characters. This tool handles the standard alphabet. If you copy from a source that wraps Base64 into lines, the decoder ignores whitespace. Check that you copied the entire encoded value, including its ending, before decoding.

Recognize text versus arbitrary bytes

Base64 can represent any bytes, including image data and other binary files. The Decode button here expects bytes that form valid UTF-8 text. An encoded image can therefore fail even when its Base64 is syntactically valid. Use a file decoder when you need a downloadable binary result. If the source text uses another character encoding, convert it to UTF-8 with an appropriate text editor first.

Understand who can read the result

Anyone who has the encoded text can decode it. Base64 changes representation and provides no secrecy. Use an approved security mechanism for private credentials or messages. The encoding runs in your browser. Use sample text when you are learning the format, and check the recipient's requirements before deciding whether a text field needs Base64 or a different encoding.

Frequently asked questions

What is Base64 for A?

The standard Base64 result is QQ==.

Can I encode accented letters?

Yes. The encoder converts the text to UTF-8 before encoding.

Can I decode Base64 with line breaks?

The decoder ignores whitespace.

Does it decode arbitrary files?

It returns valid UTF-8 text. Use a file decoder for binary data.

Is Base64 encrypted?

Anyone with the Base64 string can reverse the encoding.

Does it use Base64url?

The tool uses the standard Base64 alphabet.

Next step URL Encoder Decoder

More free tools