Home Developer Tools Base64 Encoder / Decoder

Base64 Encoder & Decoder

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.

Always Free Auto-detect 100% in-browser UTF-8 safe
Text · Image · File · URL-safe
Nothing uploaded — runs in your browser
Auto-detects encode vs decode
Handles emoji & Unicode correctly
Input0 B
Output0 B
Size change
Action

Not just encode/decode.
A complete Base64 workbench.

Most Base64 sites do one box in, one box out. This does more — and gets the tricky parts right.

Smart auto-detect

Paste anything — the tool recognises whether it's plain text or Base64 and runs the right direction automatically.

no mode-switching

UTF-8 & emoji safe

Naive tools mangle accents and emoji. Ours encodes through proper UTF-8, so 你好 and 🚀 survive the round trip.

真 · café · 🚀

Image → ready snippets

Convert an image and get the data URI plus copy-paste <img>, CSS background, and url() code.

paste & ship

Live size stats

See input/output bytes and the classic +33% Base64 overhead in real time — handy before embedding.

+33% overhead

URL-safe & MIME

Toggle the URL-safe (base64url) alphabet for tokens, or MIME line breaks for email — the options pros need.

base64url · RFC 2045

Truly private

Every byte is processed in your browser. Your text, images, and files never touch a server — ever.

100% client-side

Encode or decode in 3 steps

It's instant — results update as you type.

1

Paste your data

Drop in text, an image, or a file — or paste a Base64 string to decode.

2

Let it auto-detect

The tool picks encode or decode for you, or set the direction manually.

3

Tune the options

Flip URL-safe or MIME line breaks if you need them. Watch the live stats.

4

Copy or download

One-click copy the result, grab the ready-made snippets, or download the file.

What is Base64 encoding?

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.

Where Base64 is used

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.

Is Base64 encryption?

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.

Data URI tip: embedding small images as Base64 saves an HTTP request, but the +33% size and lost caching make it a bad idea for large or reused images. Use it for tiny icons and inline SVGs, not hero images.

Standard vs URL-safe Base64

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.

Why Unicode breaks some Base64 tools

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.

Base64,
explained.

Everything about encoding, decoding, data URIs, and what Base64 is (and isn't).

Ask a question
Yes — completely free, no signup, and fully private. All encoding and decoding happens in your browser, so your text, images, and files are never uploaded to a server.
No. Base64 is encoding, not encryption — anyone can decode it instantly. Never use it to hide passwords or secrets. For security, use real encryption or a one-way hash.
Base64 represents every 3 bytes with 4 characters, so the output is about 33% larger. That's the trade-off for making binary data text-safe — the live stats show the exact change.
Yes. It encodes text as UTF-8 before Base64, so emoji and any language round-trip perfectly — unlike tools that rely on raw btoa().
A data URI embeds a file directly in code as Base64, like data:image/png;base64,…. Convert an image in the Image tab and you get a ready-to-paste data URI plus HTML/CSS snippets.
A variant that replaces + and / with - and _ so the string is safe in URLs, cookies, and filenames. JWTs use it. Toggle "URL-safe" in the Text tab.
Because everything runs in your browser, the practical limit is your device's memory. Text and typical images are instant; very large files may take a moment.