/ Tool 04
Base64 Encoder / Decoder
Encode and decode Base64 — text, JSON tokens, or files (drag & drop, max 10 MB). UTF-8 & emoji safe, URL-safe mode, Data URI output. 100% in your browser, zero uploads.
Drop file to encode
How It Works
Paste or Drop a File
Type or paste text (emojis and accents handled correctly), or drop an image, PDF, audio or text file up to 10 MB.
Convert Live
Conversion updates as you type. On decode, the MIME type is detected from Data URIs or magic bytes — images, PDF, ZIP and more.
Copy or Download
Copy the result or download it as a file — decoded binaries come back with the correct extension. Nothing is ever sent to a server.
How to Use the Base64 Encoder & Decoder
Start with the text or data you want to transform. You can paste it directly, or drop a file — image, PDF, audio — up to 10 MB, which the tool converts for you. Choose Encode to produce a Base64 string, or Decode to turn an existing Base64 string back into its original form.
Two options are worth knowing. URL-safe mode swaps the standard "+" and "/" characters for "-" and "_", which is the variant you need when the encoded value will live in a URL, a query parameter, or a filename. Data URI mode wraps the result in a data: URI, the format used to embed small assets directly in HTML or CSS.
When you decode, the tool is strict about UTF-8: accents, emoji, and CJK text survive the round trip intact. If you get an error on decode, the string is almost certainly not valid Base64 — check for truncated copies, invisible line breaks from chat apps, or a URL-safe string being decoded in standard mode.
Why This Runs 100% in Your Browser
Base64 strings are where secrets travel: tokens, API keys, encoded credentials, PII packed into data URIs. Pasting any of those into an online encoder means the secret crosses the network to a third party you cannot audit. This tool removes that step entirely — the encoding happens in your browser and the input never leaves your machine.
The practical rule: if a string looks like a credential, it is treated as a credential here. No transmission, no logging, no server — which is also why the page keeps working fully offline.
Code & CLI Equivalents
Base64 is a standard, so every runtime has it built in. These three one-liners all decode aGVsbG8gd29ybGQ= to hello world — handy when you need the conversion inside a pipeline instead of in the browser.
# bash — encode and decode
echo "hello world" | base64 # encode
echo "aGVsbG8gd29ybGQ=" | base64 -d # decode # node / python — decode
node -e "console.log(Buffer.from('aGVsbG8gd29ybGQ=', 'base64').toString())"
python -c "import base64; print(base64.b64decode('aGVsbG8gd29ybGQ=').decode())" Frequently Asked Questions
Is Base64 encryption?
No. Base64 is an encoding, not a cipher: it represents binary data using a restricted 64-character alphabet so it can travel through text-only channels. Anyone can decode it back instantly, and it adds about 33 percent to the size of the data. Never use it to hide a secret.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses "+" and "/", both of which have special meanings in URLs. URL-safe Base64 replaces them with "-" and "_", so the string can be embedded in a URL or a filename without escaping. Decode a URL-safe string with the URL-safe option, or the replacement characters will be rejected.
What is a Data URI and when would I use it?
A Data URI is a URI that embeds the data itself — for example data:image/png;base64,... — so a small asset can be inlined directly in HTML or CSS instead of a separate file request. It is ideal for tiny icons and logos; for large files the page-weight bloat usually wins.
What file types can I drop in?
Any file up to 10 MB: images, PDFs, audio, documents, binaries. The tool reads the raw bytes and encodes them, so it does not depend on the file having a text encoding. Decoding a file's encoded output gives you the original bytes back as a downloadable file.
Why does decode fail on a string I copied from a chat app?
Two usual suspects. Chat apps wrap long lines with invisible breaks, which corrupts the string; and many sources — OAuth tokens, some SaaS dashboards — use the URL-safe variant, which standard decoding rejects. Re-paste on one line, and try URL-safe mode if the string contains "-" or "_".