Text to Base64 Converter
Encode any text as Base64, including emoji and accents.
Text
Base64
About the Text to Base64 converter
Base64 rewrites arbitrary bytes using 64 printable characters, so data can travel through channels that only accept text — email bodies, JSON fields, data URLs, HTTP headers.
This encoder handles the full Unicode range. The browser built-in `btoa` throws on anything above U+00FF, which is why emoji and accented characters so often break hand-rolled encoders. Here the text is encoded as UTF-8 first, so it always works.
Standard versus URL-safe
Standard Base64 uses `+` and `/`, both of which have meaning inside a URL and get re-encoded by browsers and proxies. The URL-safe alphabet swaps them for `-` and `_` and drops the trailing `=` padding.
Use URL-safe output for query strings, path segments and JWT-style tokens. Use standard output for everything else.
Line wrapping
Old MIME email standards require Base64 to be broken into lines of at most 76 characters. Modern APIs almost never do. Leave wrapping off unless you know the consumer wants it, because stray newlines are a common cause of decode failures.
Base64 is not encryption
Anyone can decode Base64 — there is no key and no secret. It is an encoding, not a cipher. Never use it to protect passwords, tokens or personal data.
Frequently asked questions
Why is the output longer than my input?
Base64 represents 3 bytes with 4 characters, so encoded data is about 33% larger. The trailing = signs pad the final group.
Do emoji work?
Yes. Text is encoded as UTF-8 before Base64 is applied, so every Unicode character survives a round trip.
Can I encode a file?
Upload it here for text files, or use the Image to Base64 converter for pictures — it produces a ready-made data URL.