Base64 Encoder & Decoder
Convert text to Base64 and back, with full Unicode support.
Base64 output
The converted value appears here.
About Base64 Encoder & Decoder
Base64 represents arbitrary bytes using 64 printable ASCII characters, which lets binary data travel safely through channels that only accept text - email bodies, JSON payloads, data URLs and HTTP headers.
The trade-off is size: the encoded form is roughly a third larger than the input. This tool encodes and decodes in both the standard and URL-safe alphabets and correctly handles multi-byte UTF-8 characters in both directions.
How Base64 Encoder & Decoder works in your browser
Encoding uses the browser’s built-in btoa and atob, wrapped in a TextEncoder and TextDecoder pass. That wrapper is the important part: btoa operates on Latin-1 and throws on any character above U+00FF, so encoding text containing an accent, a Cyrillic character or an emoji fails without it. Converting to UTF-8 bytes first means any Unicode input encodes and round-trips correctly.
Base64 represents three bytes as four ASCII characters, so encoded output is always about 33% larger than the input — worth remembering before embedding a large image as a data URI.
Base64 is an encoding, not encryption. It is trivially reversible by anyone, and offers no confidentiality whatsoever. It exists to move binary data safely through channels that only handle text.
When to use it
- Embedding a small image or font directly in CSS or HTML as a data URI to remove a request.
- Decoding a Base64 field from an API response, a config file or an email header to see what it holds.
- Preparing a value for a header or URL where raw binary would not survive transit.
- Decoding a payload that contains credentials — the reversibility of Base64 is exactly why that should happen locally.
Frequently asked questions
Does this handle emoji and accented characters?
Yes. Text is encoded as UTF-8 first, so any Unicode character round-trips correctly - unlike a raw call to the legacy btoa function.
What is URL-safe Base64?
A variant that replaces the plus and slash characters with hyphen and underscore and drops the padding, so the result can be used in a URL or filename without escaping.
Is Base64 encryption?
No. It is an encoding, fully reversible by anyone. Never use it to protect secrets.