Free

Free Base64 Encoder & Decoder Online

A free Base64 encoder and decoder: encode text to Base64, decode it back, or turn files into data URIs.

Free tool · No sign-up · Private

Private by design. All conversion runs in your browser's memory. Pasted text and files are never uploaded or stored anywhere.

Formats & limits

What this tool handles

Straightforward limits, stated plainly.

Full Unicode support

Text is encoded as UTF-8 first, so emoji, Urdu, Arabic and any Unicode text round-trips without corruption.

Standard Base64

Uses the standard Base64 alphabet (A–Z, a–z, 0–9, +, / with = padding). URL-safe Base64 (- and _) is decoded only if it also parses — standard output is always produced.

File → data URI

Turns a file into a data:image/...;base64,... style URI you can paste into HTML or CSS. Handy for small icons and images.

5 MB file cap

Uploads are capped at 5 MB so the tab stays responsive. There's no practical size limit for pasted text.


How it works

Three steps to converted

Pick a direction

Choose Text → Base64 to encode, Base64 → Text to decode, or File → Base64 to turn an upload into a data URI.

Paste or pick

Type or paste your text, or choose a file. Text modes convert live as you type; files encode the moment you select them.

Copy the result

The output panel shows the result with a character count. Hit Copy result and paste it wherever you need it.


Use cases

When Base64 helps

Debug API tokens

JWT payloads and OAuth tokens are Base64-encoded. Paste the middle segment to read its claims in plain text.

Embed images in CSS

Turn a small icon into a data URI and inline it in your stylesheet — one less HTTP request, no broken image paths.

Email attachments

MIME email encodes attachments as Base64. Decode a chunk to inspect it, or encode text for a raw email test.

Test webhooks

Many APIs want binary data as Base64 strings in JSON. Encode your payload here before pasting it into the request body.

Inspect encoded URLs

Some services hide parameters in Base64 query strings. Decode them to see what's actually being passed.


FAQ

Base64 questions

What is Base64 encoding used for?
Base64 turns binary data into plain ASCII text so it can travel safely through text-only systems — embedding images in HTML/CSS as data URIs, putting files in JSON payloads, or sending attachments in email (MIME).
Does this handle emoji and non-English text?
Yes. Text is encoded as UTF-8 before conversion, so Urdu, Arabic, emoji and every Unicode character round-trips correctly. Many older tools only handle ASCII — this one doesn't have that problem.
Is my text or file uploaded anywhere?
No. Encoding and decoding happen entirely in your browser. Nothing you paste or upload leaves your device — safe for API keys, tokens and sensitive strings.
Why does decoding fail with an error?
The input probably isn't valid Base64: look for stray spaces, missing padding (=) at the end, or characters outside A–Z, a–z, 0–9, +, / and =. Remove them and try again.
How do I use the data URI the file mode gives me?
You can paste it straight into an <img> tag's src attribute or a CSS background:url(). It works offline because the file's bytes are embedded in the string — but the page gets heavier, so it's best for small images and icons.
Is there a file size limit?
Yes — 5 MB. Encoding happens in memory in your browser, and very large files would freeze the tab. For bigger files, use a desktop tool.

Keep exploring

Related tools

For developers

Need this programmatically?

YATools also exposes simple REST APIs for screenshots, audio, documents, and more — free tier included.

Explore the API →