✦Free Tools LibraryRuns in your browser All 52 tools →
Utilities

Base64 Encoder & Decoder – Text & Files

Turn text or a whole file into Base64, and turn Base64 back into the text — or the file — it came from. Encoding happens on your device, so even private files stay private.

Free · No sign-up · Works on phone and computerOpen the tool full-screen →

About this tool

Base64 is how binary data travels through text-only places: images inside CSS and HTML data URIs, email attachments, API payloads and tokens. This tool works both directions and with real files, not just short strings. Encoding handles any language properly (the text is encoded as UTF-8 first, so accents and emoji survive — a step many quick encoders get wrong). Decoding is just as careful: it accepts data: prefixes and URL-safe variants, checks the result, shows it as text when it is text, and offers the raw bytes as a file download when it is not — which is how you recover an image or PDF from a Base64 blob.

How to use it

  1. Choose Encode or Decode — one toggle switches the whole tool.
  2. Add your input — paste text or a Base64 string, or choose a file from your device to encode.
  3. Copy or download — copy the Base64 (or the decoded text), or download the decoded bytes as a properly named file.

What you get

Frequently asked questions

What is Base64 used for?
Base64 represents binary data as text so it can pass through systems built for text: embedding an image in HTML or CSS as a data URI, sending attachments in email, or carrying bytes inside JSON APIs.
How much bigger does Base64 make a file?
About a third bigger — every 3 bytes become 4 characters, plus padding. A 300 KB image becomes roughly 400 KB of Base64 text.
Can I decode Base64 back into an image or PDF?
Yes. Paste the Base64, press Decode, and if the bytes are not readable text the tool offers them as a file download — name it with the right extension (like .png or .pdf) when you save it.
Is it safe to decode Base64 from strangers?
Decoding here only converts the data in your browser — nothing runs. Still, treat a decoded file like any download from an untrusted source and scan it before opening.

Related free tools

From the blog

New to this one? The blog walks through how to use the Base64 Encoder & Decoder step by step — and what it is good for.

Read the Base64 Encoder & Decoder guide →