SGVsbG8sIHdvcmxkIQ==
Base64 encoder and decoder
Base64 is an encoding that represents binary data using 64 printable characters (A-Z, a-z, 0-9, + and /), so it can travel safely through text-only channels.
Encode text to Base64 or decode it back, with UTF-8 support and ready-to-paste data URIs for CSS and HTML. Free, and nothing leaves your browser.
Last reviewed
Your inputs are saved as a draft in this browser only. Nothing is uploaded.
Result
SGVsbG8sIHdvcmxkIQ==
Examples
Encode a word
"Hello" encodes to SGVsbG8=. The = is padding, because 5 bytes do not divide evenly into 3-byte groups.
Encode a sentence
"Hello, world!" encodes to SGVsbG8sIHdvcmxkIQ==.
Unicode text
"₹100" encodes to 4oK5MTAw. The rupee sign is 3 bytes in UTF-8, so it takes 4 Base64 characters on its own.
Decode
U2FtcGxlIHRleHQ= decodes to "Sample text".
Data URI
Encoding "Hello" with the data URI profile and MIME type text/plain gives data:text/plain;base64,SGVsbG8=, which you can use in an href or a CSS url().
Base64url
"??>" encodes to Pz8+ in standard Base64 and Pz8- in Base64url, which replaces + with - and / with _ and usually drops the = padding. JWTs use Base64url.
Size overhead
Every 3 bytes become 4 characters, so a 1,024-byte file becomes 1,368 Base64 characters, about a third larger.
How to use it
- Choose the operation: encode text or decode Base64.
- Pick an input profile: plain text, data URI, or file payload metadata.
- For data URIs, set the MIME type and file name.
- Paste your text or Base64 payload and copy the result.
Questions
- Can it generate a data URI?
- Yes. Choose the data URI input profile and set a MIME type; the output is a ready-to-embed data: string for CSS backgrounds or HTML.
- Does it handle Unicode text and emoji?
- Yes. Text is UTF-8 encoded before the Base64 step, so non-ASCII characters survive an encode and decode round trip.
- Is Base64 encryption?
- No. Base64 is an encoding, not encryption: anyone can decode it without a key. Never use it to hide passwords or secrets.
- Why does Base64 output end with = or ==?
- Base64 works in groups of 3 bytes. When the input length is not a multiple of 3, the output is padded with one or two = characters so its length is a multiple of 4.
- What is the difference between Base64 and Base64url?
- Base64url replaces + with - and / with _ so the result is safe in URLs and file names, and it usually omits the = padding. To decode Base64url with a standard decoder, swap those characters back and add padding to a multiple of 4.
- Why is the encoded text bigger than the original?
- Each 3 input bytes become 4 output characters, so Base64 is about 33% larger than the input, plus any padding.
- Is my payload uploaded when I encode it?
- No. Encoding and decoding run entirely in your browser and nothing is uploaded.