
How to use
- Paste plain text to encode, or a Base64 string to decode, into the Input box.
- Click Encode or Decode. Accented letters, emoji and other languages work, since text is encoded as UTF-8 first.
- Click Copy output. If the input is not valid Base64, the tool tells you instead of returning garbled text.
What Base64 is
Base64 turns any data into a string made only of 64 safe characters: A–Z, a–z, 0–9, + and /, with = used as padding at the end. That lets binary data or special characters travel through systems that only handle plain text, such as email, URLs in some cases, JSON and HTML.
It works by taking 3 bytes (24 bits) at a time and writing them as 4 characters of 6 bits each. That is why Base64 is always about a third larger than the original: 3 bytes in, 4 characters out.
Base64 examples
Encode any of these yourself to see the same result.
| Text | Base64 |
|---|---|
| Hi | SGk= |
| hello | aGVsbG8= |
| Hello, World! | SGVsbG8sIFdvcmxkIQ== |
| café | Y2Fmw6k= |
Where you see Base64
Email attachments are sent as Base64 inside the message. Small images are often embedded in web pages and CSS as data URLs that start with data:image/png;base64,. Basic authentication headers, JSON Web Tokens and many API payloads use Base64 too, as do keys and certificates in PEM files between the BEGIN and END lines.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding, not encryption: anyone can decode it, with no key or password. Never use it to hide passwords or secrets. Use the Text Encryptor for that.
What do the = signs at the end mean?
They are padding. When the input length is not a multiple of 3 bytes, one or two = signs fill the last group of 4 characters, so "Hi" (2 bytes) becomes SGk= and "Hello, World!" (13 bytes) ends in ==.
What is URL-safe Base64?
A variant that uses - and _ instead of + and / so the result can sit in a URL or file name without escaping, often with the padding removed. JSON Web Tokens use it. To decode it here, replace - with + and _ with /, and add = signs until the length is a multiple of 4.
Why is the Base64 version longer than the original?
Base64 turns every 3 bytes into 4 characters, so the result is about 33% larger, plus up to two = signs of padding. That is why images embedded as Base64 data URLs make a page heavier than linking to the file.
Is my text uploaded?
No. Encoding and decoding happen in your browser and nothing is sent or stored.