tooloora

Base64 Encode & Decode — text, files & data: URIs, local

Encode text to Base64, turn files into data: URIs with ready-to-paste snippets, and convert data: URIs back into files — entirely in your browser.

Runs locally — nothing is uploaded

Runs locally in your browser — no upload.

Encode and decode Base64 in your browser

Paste text to convert it to Base64 or back, turn a file into a data: URI with ready-to-paste CSS/HTML snippets, or paste a data: URI and download it back as a file. Everything updates instantly and runs in your browser: no upload, no signup, and it works offline.

What is Base64 and when do you need it?

Base64 encodes data using 64 printable ASCII characters so it can pass safely through systems built for text — email attachments, data: URLs, JSON and JWT tokens, HTTP Basic Auth. Because every 3 bytes become 4 characters, Base64 output is about 33% larger than the input (RFC 4648). It is a transport format, not compression and not security.

Encode vs. decode, and URL-safe mode

  • Encode turns plain text into Base64.
  • Decode turns Base64 back into the original text.
  • URL-safe swaps + and / for - and _ and removes = padding, so the value works inside URLs and filenames.

The decoder accepts both standard and URL-safe input, ignores line breaks and fixes missing padding automatically.

How do I turn a file into a data: URI — and back?

In the file mode, drop any file up to 16 MB. The tool determines the MIME type from the file extension (deliberately so: Windows reports CSV files as an Excel type, and a wrong type makes browsers silently ignore the URI), builds the data: URI and shows the size before and after. For images you get CSS and <img> snippets, for fonts a complete @font-face rule including the format() hint that Safari requires.

The reverse direction works too: paste any data: URI — Base64 or percent-encoded — and the tool shows its MIME type and decoded size and lets you download it as a file with a fitting extension.

When is embedding a bad idea?

Honest guidance instead of a silent convert-anything button: an embedded data: URI is about a third larger than the file, browsers cannot cache it separately, and every change re-ships the whole containing file. The tool warns above 4 KB, advises against embedding above 32 KB, and refuses above 16 MB — small icons and fonts are the sweet spot, photos rarely are.

Base64 is not encryption

This is worth repeating: Base64 offers zero confidentiality. Anyone can decode it in a second. Never store passwords, API keys or personal data as “protected” just because they're Base64 — use real encryption. Base64 only makes binary data text-safe.

Correct with UTF-8

Text is read as UTF-8 before encoding, so umlauts (ä, ö, ü), accents and emoji survive the round trip exactly. The whole process happens locally with your device's own resources — your text and files are never sent anywhere.

Frequently asked questions

What is Base64 encoding?

Base64 represents binary or text data using 64 printable ASCII characters (A–Z, a–z, 0–9, + and /). It lets data that might otherwise be altered — like an image or text with special characters — travel safely through systems that only handle text, such as email or JSON. It typically makes data about 33% larger.

How do I turn an image into a data: URI?

Switch to the file mode and drop the image (or any file up to 16 MB). The tool detects the MIME type from the file extension, builds the data: URI, shows the size before and after, and offers ready-to-paste CSS and HTML snippets. For fonts it generates a complete @font-face rule including the format() hint.

When should I not embed a file as a data: URI?

Above a few kilobytes, embedding usually hurts: the URI is about 33% larger than the file (RFC 4648), browsers cannot cache it separately, and every change re-ships the whole containing file. The tool flags this honestly — above 4 KB it warns, above 32 KB it advises against embedding, and above 16 MB it refuses.

Is Base64 encryption?

No. Base64 is encoding, not encryption — it provides no security at all. Anyone can decode it back instantly. Never use it to protect passwords or sensitive data; use real encryption for that.

Are my text and files uploaded?

No. Encoding and decoding run entirely in your browser using your device. Nothing is sent to a server, so even confidential text and files stay on your machine — it even works offline.

Does it handle emojis and umlauts correctly?

Yes. The text is read as UTF-8 before encoding, so characters like ä, ö, ü and emoji round-trip exactly. Many naive Base64 tools corrupt these — this one does not.