Base64 Encoding / Decoding
Preview not available for this file type
Privacy Notice
All encoding and decoding is performed locally in your browser using JavaScript. No input data is sent to any server, stored, or logged. Miracle Salad does not collect or retain any content entered into this tool.
About Base64 Encoding
Base64 turns arbitrary binary data into plain text made of 64 safe characters. That is its entire job. It is not compression — the output is larger, not smaller. And it is not encryption, although it is mistaken for it constantly. It exists because a great many channels can carry text but choke on raw bytes.
How to use this tool
- 1 Choose Encode or Decode, then paste your text — or switch to file mode and drop a file in.
- 2 The result appears as you type; nothing is uploaded and no button press is needed.
- 3 When decoding into a file, type the extension so the preview and download know what they are handling.
Base64 is not encryption
This is the point worth remembering above all others. Base64 has no key and no secret; the transformation is public and reversible by anyone, as this page demonstrates in a single click. Text that merely looks scrambled offers no protection at all. If you find a password, an API key or a token stored as Base64, treat it as if it were written in plain sight — because it is. Use real encryption when the goal is secrecy, and use Base64 only when the goal is safe transport.
Why it exists at all
Many systems were designed for text and only text. Email bodies, JSON payloads, XML documents, URLs and HTML attributes all break when a raw byte happens to look like a control character or a quotation mark. Base64 sidesteps the problem by mapping every possible byte onto a small alphabet of letters, digits and two punctuation marks that survive any of these channels intact. That is why you meet it in email attachments, in data URIs that embed a small icon directly in a stylesheet, and in the middle segment of every JWT.
The price is about a third more
Three bytes of input become four characters of output, so the result is roughly 33% larger than what you started with. For a short token that is irrelevant. For a large image inlined into a stylesheet it is not: the file grows, it cannot be cached separately from the page, and the browser must decode it before it can paint. Inline small assets if it saves a request, keep large ones as ordinary files, and remember that Base64 never makes anything smaller — if size is your problem, compression is the tool you want.