Base64 Encode
Encode plain text to Base64 instantly in your browser. Handles Unicode text — accented characters, CJK, and emoji — correctly.
Unicode Safe
Correctly encodes multi-byte characters and emoji, not just ASCII.
Handles Large Text
Encodes strings up to 50MB without freezing the page.
Local Processing
Your data never leaves your browser. Privacy first encoding.
How to Encode Text to Base64
- Type or paste the text to encode — plain ASCII, accented characters, CJK text, and emoji are all handled correctly.
- Click Encode.
- The Base64 string appears in the output pane.
- Copy it into your header, data URI, config value, or wherever binary-safe text is required.
Example: Encoding Unicode Text Safely
Input — mixed-script text
Café ☕ meets 東京
Output — Base64
Q2Fmw6kg4piVIG1lZXRzIOadseS6rA==
The trailing == is padding that squares the output length to a multiple of four — it’s part of the encoding, keep it.
Why Unicode needs care in Base64
Base64 encodes bytes, not characters — so text must be converted to bytes first, and the choice of encoding matters. This tool encodes your text as UTF-8 before Base64-encoding, which is why é, ☕, and 東京 round-trip correctly. Naive JavaScript btoa() calls throw on exactly these characters, one of the most common Base64 bugs in the wild.
What Base64 is — and is not
Base64 is a transport encoding: it makes arbitrary data safe to embed in text-only channels like JSON strings, HTTP basic-auth headers, and data URIs, at the cost of roughly 33% size overhead. It is not encryption and offers zero secrecy — anyone can decode it instantly, so never treat Base64-encoded secrets as protected.
Frequently Asked Questions
The browser's native btoa() function only understands "binary strings" — one byte per character, 0-255 — so feeding it Unicode text directly either throws an error or silently corrupts multi-byte characters. This tool converts your text to UTF-8 bytes first (via TextEncoder) and only then Base64-encodes those bytes, which is why café, 日本語, and 😀 all round-trip correctly here.
Not on this page — it only accepts and produces text. Encoding a file would mean reading raw bytes rather than a text string, which is a different tool; this one is scoped to the "encode this string of text" use case.
No, and this is a common misconception worth being direct about: Base64 is just a reversible text encoding, not encryption. Anyone can decode it instantly with no key or password — including this exact tool's Decode page. Never rely on Base64 to protect sensitive data.
No. Encoding happens entirely in your browser using the native btoa()/TextEncoder APIs — nothing you paste here is ever transmitted anywhere.
About 33% larger. Base64 packs 3 bytes of input into 4 output characters, so the encoded output is always roughly 4/3 the size of the original UTF-8 byte length — worth knowing if you're about to embed something sizeable in a URL, JSON field, or config file.
Related Tools
Base64 Decoder
Decode Base64 text back to readable Unicode instantly.
JSON Formatter
Make messy, minified JSON readable with customizable indentation.
JSON Validator
Check JSON validity with precise line/column errors.
URL Encoder
Safely percent-encode text for use in URLs and query strings.
JSON to YAML
Convert JSON documents to clean, indented YAML.
JSON to XML
Convert JSON into well-formed XML markup.