Free Tool · In-Browser · No Upload

Base64 Encoder & Decoder

Encode or decode Base64 — text or files — without anything leaving your browser. URL-safe variant, data URLs and a live image preview built in.

100% free no signup Zero data uploaded No ads or trackers
Direction
Input
Output
Try an example:
Recent on this device

Nothing saved yet. Your recent inputs appear here — stored only in this browser, never uploaded.

Your data never leaves your browser

This tool runs entirely in your browser. There is no upload endpoint on this page — your input is processed locally with native browser APIs, and nothing is sent to a server or logged. Open your browser's network panel and check: the only request is the page itself.

How it works

Three steps, no surprises

1

Pick text or file

Paste a string, or drop in a file. Auto mode works out whether you mean encode or decode.

2

Tune the options

Flip on URL-safe for query strings, or Data URL to get a ready-to-embed data: value for files.

3

Copy, download or share

Copy the result, download it as a file, or grab a share link that carries your input in the URL — never on a server.

FAQ

Base64 Encoder & Decoder questions, answered

What is Base64 used for?

Base64 represents binary data using 64 printable ASCII characters, so it can travel safely through systems built for text. Common uses include embedding images directly in HTML or CSS as data URLs, encoding email attachments (MIME), storing binary blobs in JSON or XML, and carrying credentials in HTTP headers such as Basic authentication. It is an encoding, not encryption — anyone can decode it.

What’s the difference between standard and URL-safe Base64?

Standard Base64 uses + and / as its 63rd and 64th characters and pads the end with =. Those characters have special meaning in URLs and filenames, so the URL-safe variant replaces + with - and / with _, and usually drops the = padding. Use URL-safe Base64 when the value goes into a query string, a path segment or a filename; use standard otherwise. This tool switches between the two with one toggle.

Why is my Base64 1.33× longer than the original?

Base64 encodes every three bytes of input as four output characters, so output is about 4/3 the size of the input — roughly a 33% increase, before any padding. That overhead is the price of making binary data safe to transmit as text. It is why you would not Base64-encode large files for storage, but it is fine for small assets like icons inlined as data URLs.

Can I encode any file type?

Yes. In File mode you can drop in any file — an image, a PDF, a font, an archive — and the tool reads it with the browser’s File API and produces its Base64 (or a full data URL). For images, a live preview of the decoded result is shown so you can confirm the output is valid. The practical limit is your device’s memory, since the whole file is held in the browser.

Is the file uploaded when I encode it?

No. The file is read locally with FileReader and encoded on the page. There is no upload endpoint, and nothing is transmitted to a server. You can verify this by opening your browser’s network panel while you encode — you will see no request carrying your file.

What’s a data URL?

A data URL embeds a file’s contents directly in a URL, in the form data:[mime-type];base64,[the-base64-data]. For example, a small PNG becomes data:image/png;base64,iVBORw0KGgo… You can paste a data URL straight into an <img> src or a CSS background, which saves an extra network request for tiny assets. This tool can output a raw Base64 string or a complete data URL, and can reverse a data URL back into a downloadable file.

Need help with your website's SEO?

Book a free consultation with our London team.

Book a Free Consultation