Base64 encoder
Base64 encode any text, emoji and non-Latin scripts included, with correct UTF-8 handling. Runs in your browser, so nothing you paste is uploaded.
How to Base64 encode text
Paste or type text into the input pane and click Convert. The text is turned into UTF-8 bytes and encoded with the standard Base64 alphabet, A to Z, a to z, 0 to 9, + and /, with = padding at the end. Copy the result. The output grows by about a third, since every 3 bytes become 4 characters.
Why encode to Base64
It's used to put data inside URLs, JSON, HTML attributes and email. It also carries credentials in HTTP headers, where raw bytes would not be safe.
Correct handling of Unicode text
This encoder turns text into UTF-8 bytes first. Emoji and accented or non-Latin characters encode correctly instead of getting corrupted.
Where Base64 shows up
HTTP Basic authentication sends user:password as Base64 in the Authorization header. Email attachments travel as Base64 inside MIME. Data URLs embed small images in HTML and CSS, and many APIs carry binary fields such as file contents or keys as Base64 strings in JSON. Each of these uses the same standard alphabet this tool produces.
Before you start
Input: TXT. Output: Base64. The settings appear before anything runs, so you can check them first. Your original file is never changed.
The value you enter is processed in your browser. Still test the output where it will be used. Clean formatting does not prove the data is safe or correct.
Keep the original until you have opened and checked the result. The work happens in this browser tab, so the size you can handle depends on your device's memory, your browser and the file itself.
How to use the Base64 encoder
- Paste the text you want to encode.
- Click Convert to get the Base64 string.
- Copy the result.
Last updated · How we build and check tools · Report an error