UTF-8 to Base64 Encoder
Encode UTF-8 text to Base64 in your browser. Accents, emoji and other languages become their UTF-8 bytes first, so the result always decodes back to your text.
Loading tool...
How to Convert UTF-8 to Base64 - Step by Step Guide
Enter UTF-8 Text
Start by typing or pasting your UTF-8 text into the input area. Emoji and international characters are all handled through their UTF-8 bytes.
Automatic Encoding
The tool encodes your text to Base64 about a second after you stop typing. It encodes the UTF-8 bytes, not the raw characters, which is why the result decodes back without garbling accents.
Copy or Download Result
Once encoded, copy the Base64 string to your clipboard or download it as a text file for use in an API payload, email, or wherever you need plain text.
What is UTF-8 to Base64 Encoding?
UTF-8 is how text is stored on the modern web: each character becomes one to four bytes. Base64 then repackages those bytes into a string of plain A-Z, a-z, 0-9, + and / characters, so international text can travel through channels that only like ASCII — JSON APIs, email, data URIs and the like.
The order matters: encoding the characters directly (as a bare btoa() call does) breaks on anything past Latin-1. Encoding the UTF-8 bytes, the way this tool and the TextEncoder API do, keeps every emoji and accent intact.
Frequently Asked Questions
How do I encode UTF-8 to Base64?
Type or paste your UTF-8 text into the left panel. About a second after you stop typing, the Base64 shows up on the right. For example, José 😀 becomes Sm9zw6kg8J+YgA== and decodes back exactly.
Why doesn't JavaScript's btoa() work on this text?
btoa() only accepts Latin-1 characters, so it throws an error on emoji or CJK, and it turns an accented letter like é into a single byte. Decode that byte as UTF-8 and you get mojibake — José comes back as José. This tool first encodes your text as its UTF-8 bytes (the way TextEncoder and the base64 command do), then Base64-encodes those bytes, so the result survives the round trip.
Why is the Base64 longer than my text?
Two reasons. UTF-8 stores many characters as more than one byte — a letter with an accent is 2 bytes and an emoji is usually 4 — and Base64 then adds about a third on top, because it packs every 3 bytes into 4 printable characters. So a short line with an emoji can look surprisingly long once encoded.
Can I encode emoji and other languages?
Yes. UTF-8 covers the whole Unicode range, so emoji (😀), Chinese (中文), Arabic (العربية) and anything else all encode cleanly and decode back to the same text. If half of an emoji is missing from your text (a lone surrogate), UTF-8 can't hold it, so it is encoded as the replacement character and a short note tells you.
Is my text uploaded anywhere?
No. The encoding runs in your browser, the text is never sent to our server, and nothing is kept once you leave — a reload starts with an empty editor. Remember that Base64 is only an encoding, not encryption: anyone can decode it, so it does not hide passwords or other secrets.
Is this converter free?
Yes, it's free and there's nothing to sign up for. Very long text can take a moment because the whole result has to fit in the editor.
Related Tools
Hex to Base64
Convert hexadecimal data to Base64 encoded strings for APIs and data transmission
Base64 to Hex
Decode Base64 encoded strings to hexadecimal format for cryptography and binary data
Binary to Base64
Encode binary data (0s and 1s) to Base64 format for data transmission
Base64 to Binary
Decode Base64 to binary format (0s and 1s) for debugging and bit-level analysis
ASCII to Base64
Encode ASCII text to Base64 format for embedded systems and protocols
Base64 to ASCII
Decode Base64 to ASCII text for legacy systems and serial communication