Encode text to Base64 or decode it back — instantly and privately. Auto-detects which way to go, handles emoji and any language, and supports URL-safe and MIME options. Free, no signup, runs entirely in your browser.
What makes it different
Most Base64 sites do one box in, one box out. This does more — and gets the tricky parts right.
Paste anything — the tool recognises whether it's plain text or Base64 and runs the right direction automatically.
no mode-switchingNaive tools mangle accents and emoji. Ours encodes through proper UTF-8, so 你好 and 🚀 survive the round trip.
真 · café · 🚀Convert an image and get the data URI plus copy-paste <img>, CSS background, and url() code.
See input/output bytes and the classic +33% Base64 overhead in real time — handy before embedding.
+33% overheadToggle the URL-safe (base64url) alphabet for tokens, or MIME line breaks for email — the options pros need.
base64url · RFC 2045Every byte is processed in your browser. Your text, images, and files never touch a server — ever.
100% client-sideQuick guide
It's instant — results update as you type.
Drop in text, an image, or a file — or paste a Base64 string to decode.
The tool picks encode or decode for you, or set the direction manually.
Flip URL-safe or MIME line breaks if you need them. Watch the live stats.
One-click copy the result, grab the ready-made snippets, or download the file.
Base64 is a way of representing binary data — images, files, or any bytes — using only 64 plain text characters (A–Z, a–z, 0–9, plus + and /). It works by taking every 3 bytes of data and mapping them to 4 text characters, which is why Base64 output is always about 33% larger than the original. The point isn't to compress or encrypt — it's to make binary data safe to travel through systems that only expect text.
You'll find Base64 behind the scenes in email attachments (MIME), data URIs that embed images directly in HTML or CSS, JSON Web Tokens (JWT), HTTP Basic Authentication, and PEM-format certificates. Anywhere binary data needs to ride inside a text-only channel, Base64 is usually doing the work.
No — and this is a common and important misconception. Base64 is encoding, not encryption. Anyone can decode a Base64 string instantly (this tool does it in one paste). Never use Base64 to "hide" passwords or secrets; it offers zero security. For protecting data, use real encryption or a one-way hash.
Standard Base64 uses + and /, plus = for padding. The trouble is those characters have special meaning in URLs and filenames. The URL-safe variant (base64url, RFC 4648 §5) swaps + → - and / → _ and usually drops the padding, so the string can be dropped straight into a URL, cookie, or filename without escaping. JWTs use this variant. Toggle URL-safe in the Text tab to switch alphabets.
JavaScript's built-in btoa() only understands Latin-1, so feeding it an emoji or a non-Latin character throws an error or corrupts the output. The correct approach — which this tool uses — is to first encode the text as UTF-8 bytes, then Base64-encode those bytes. That's why pasting héllo 🚀 你好 here round-trips perfectly, while many older tools turn it into garbage.
FAQ
Everything about encoding, decoding, data URIs, and what Base64 is (and isn't).
Ask a question33% larger. That's the trade-off for making binary data text-safe — the live stats show the exact change.btoa().data:image/png;base64,…. Convert an image in the Image tab and you get a ready-to-paste data URI plus HTML/CSS snippets.+ and / with - and _ so the string is safe in URLs, cookies, and filenames. JWTs use it. Toggle "URL-safe" in the Text tab.