Base64 Encode and Decode

Paste text or Base64, or drop a file, and switch between encode and decode instantly. Nothing is sent anywhere.

Base64 Encode and Decode

Drop your file here

Up to 15MB per file. Stays on this device.

Nothing is sent anywhere. Turn off your Wi-Fi and this page still works - try it.

How it works

  1. Paste text or a Base64 string into the box, or drop a file of any type.
  2. Choose Encode or Decode - the result updates immediately, no need to re-paste.
  3. Copy the result, or download it as a file if it turns out to be binary data rather than text.
Example output

Input (text)

filetools: café edition

Output (Base64)

ZmlsZXRvb2xzOiBjYWbDqSBlZGl0aW9u

Plain text encoded to Base64. Decode mode reverses the same conversion.

Frequently asked questions

Is my text or file sent anywhere?

No. Pasted text and dropped files are both read and converted entirely on your device, and nothing is sent to a server. Turn off your Wi-Fi after the page loads and it still works. This page loads 11KB of JavaScript, gzipped - about what your browser's network tab will show for this page's own scripts.

What is Base64, in plain terms?

A way of representing arbitrary bytes (any file, or text with characters outside plain ASCII) using only 64 printable characters - letters, digits, +, and /. It is not encryption and does not hide or protect data; anyone can decode it back to the original with a tool like this one.

Can I encode or decode a whole file, not just text?

Yes. Drop any file to encode - a common use is turning a small image into a Base64 string to embed directly in CSS or HTML. In decode mode, drop a text file that contains Base64 and download the decoded result as a binary file.

What does "URL-safe" mean, and when do I need it?

Standard Base64 uses + and /, both of which have special meaning inside a URL. URL-safe Base64 (RFC 4648 section 5) swaps those two characters for - and _ instead, so the result can be dropped straight into a URL or filename. Turn the toggle on if the Base64 you are working with came from a URL, a JWT, or an API that documents itself as URL-safe.

What happens if I paste Base64 that decodes to a file, not text?

The result is checked to see whether it is valid UTF-8 text. If it is not (almost always genuine binary data, such as an image or a PDF), you get a plain message saying so and a download button for the decoded file, rather than a garbled attempt to display it as text.

What happens if I paste something that is not valid Base64?

You get a plain-English message naming the specific problem - a character outside the Base64 alphabet, padding in the wrong place, or a length that is not possible for Base64 - instead of a silent wrong result. Whitespace and line breaks in the pasted text are ignored rather than treated as errors, since that is how Base64 is often shared.

Files are processed locally in your browser and never uploaded. Read more on the privacy page.