IMAGE BASE64 TOOLBase64 decoder

Base64 Encode — Text to Base64

Base64 encode on this page converts text to UTF-8 bytes. Text to Base64 encodes UTF-8 bytes: our visually similar accent samples produced different results until optional NFC normalization made their byte sequences match.

Ready. Encoding stays in your browser.

Similar text, different UTF-8 bytes

We created two visually similar inputs for this run. The first spells Café with one precomposed accented letter. The second spells Café with a separate combining accent after the final letter. We encoded each exact string as UTF-8, converted those bytes to Base64, decoded the result and compared the recovered bytes with the input bytes. We did not normalize either input in this first comparison.

InputUTF-8 bytesHexBase64Recovered bytes match?
Café5436166c3a9Q2Fmw6k=Yes
Café643616665cc81Q2FmZcyBYes
😀4f09f98808J+YgA==Yes
A\r\nB4410d0a42QQ0KQg==Yes
A\nB3410a42QQpCYes
UTF-8 bytes and hex for the accent rows.
UTF-8 bytes and hex for the accent rows.
UTF-8 bytes and hex for the emoji row.
UTF-8 bytes and hex for the emoji row.
UTF-8 bytes and hex for the line-ending rows.
UTF-8 bytes and hex for the line-ending rows.
Base64 output for each table row.
Base64 output for each table row.

Measured precomposed input: 5 bytes, hexadecimal 436166c3a9, Base64 Q2Fmw6k=. Measured combining-accent input: 6 bytes, hexadecimal 43616665cc81, Base64 Q2FmZcyB. Both recovered byte sequences matched their own originals. They did not match each other. These are measurements from the saved sample strings, not estimates from how the text looks.

For a controlled second run, enable NFC normalization and encode the combining-accent input again. Its measured result becomes Q2Fmw6k=, matching the precomposed input. Normalization changes the input representation before encoding; it is optional and off by default. The converter does not silently apply it.

We also measured an emoji and two line-ending samples. The emoji produced 4 UTF-8 bytes and Base64 8J+YgA==. A carriage return followed by a line feed produced the bytes 410d0a42 and result QQ0KQg==; a line feed alone produced 410a42 and result QQpC. Each decoded back to its recorded bytes. In a browser textarea, line endings may be normalized by the input control. Those two line-ending rows were measured from explicit script strings rather than claimed as distinct pasted textarea inputs.

To reproduce the accent comparison, copy the exact strings from the table, leave normalization off and record the byte count and output. Decode each result as UTF-8. Then turn normalization on for the combining-accent row and compare again. The saved hex sequences let you check that you copied the intended input instead of relying on its appearance.

Two visually similar accent inputs use different UTF-8 byte sequences

How to encode text

Enter text, choose Encode text and copy the result. This text to base64 converter handles Unicode through UTF-8. Use it to encode base64 from text; use the decoder for the reverse direction. The result is plain Base64, without a data URI prefix. It processes one input at a time, has no account or stored history, and is limited by available device memory.

Does Base64 protect private text?

No. The safety question in our material list also applies to text: encoding is not encryption. This converter processes the input locally and does not upload it. Anyone with the output can decode it. Do not treat an encoded password as a protected password.

Why can similar text produce different output?

The measured accent rows above answer this question with exact byte sequences. Choose normalization only when changing the text representation is appropriate for your receiving system. Keep it off when the original byte representation must be preserved.

Base64 encode online for text

Use this page for base64 encode online when the input is text. The existing UTF-8 and optional normalization rules still apply; this tool does not encode an uploaded file.

Is b64 encode the same operation?

Yes. Here b64 encode means encoding text bytes as Base64. It is not encryption, and normalization remains optional.

Watch the UTF-8 comparison

The video covers the same measured samples. Loading the player connects to YouTube, which may process your IP address and playback information. The converter works without loading it.

Watch the published video on YouTube

For numeric character codes, use the ASCII code to text decoder.

For numeric character codes from text, use the Text to ASCII encoder.

For a digest rather than reversible encoding, use the SHA-256 text hash generator.

For legacy MD5 checks with explicit security limitations, use the MD5 text hash generator.

To distinguish Unicode code points, UTF-16 escapes and UTF-8 bytes, use the Unicode code point and UTF-8 converter.

Related experiment: How to Stream Base64 into UTF-8 Text in Python — watch on YouTube.

For Bitcoin-alphabet encoding of UTF-8 text or hexadecimal bytes, use Base58 Encode.