Base64 Encoder
Encode text to Base64 as you type. Any language and emoji work, as the text is encoded as UTF-8, the way other programs and websites expect.
Input
Output
Guide
What is Base64 for?
Base64 writes any data with 64 characters that pass safely through systems made for plain text: A to Z, a to z, 0 to 9, + and /, with = as padding at the end. Every 3 bytes become 4 characters, so the result is about a third longer than the original. Email uses it to carry attachments, web pages use it in data: URLs to hold small images and fonts, and HTTP Basic authentication sends the user name and password in it. It's an encoding, not encryption: anyone can decode it, so it keeps nothing secret.
Tool description
Type or paste text into the Decoded box, and its Base64 appears in the Encoded box as you type, ready to copy. The text is encoded as UTF-8, the character encoding most programs and websites use, so any language, symbol or emoji works, and the result matches what other tools and programming languages give.
To turn Base64 back into text, press the swap button between the boxes, which also moves the result into the input, or use the Base64 Decoder.
Features
- Encodes text to Base64 as you type
- UTF-8, so every language and emoji works
- Standard Base64 with
+,/and=padding - Runs in your browser
Examples
| Decoded | Encoded |
|---|---|
Picnic at noon |
UGljbmljIGF0IG5vb24= |
Happy birthday! |
SGFwcHkgYmlydGhkYXkh |
café |
Y2Fmw6k= |
€ |
4oKs |
👋 |
8J+Riw== |
Good to know
- The
=signs fill out the last group of four characters:SungivesU3Vu,SugivesU3U=andSgivesUw==. - Spaces and line breaks are part of the text:
HigivesSGk=, butHiwith a line break after it givesSGkK. If your Base64 doesn't match someone else's, look for a stray space or line break. - Letters like é take two bytes in UTF-8, so
cafégivesY2Fmw6k=. Programs that save text in Latin-1, an older encoding, giveY2Fm6Q==instead. - URL-safe Base64, used in web addresses and file names, writes
-and_in place of+and/and often leaves out the=. This tool writes standard Base64:Lunch?givesTHVuY2g/, which isTHVuY2g_in URL-safe Base64. - To encode a file or an image, use the File to Base64 Converter.