Skip to content

Base64 Encoder & Decoder — Text and Files, Free Online

Encode or decode Base64 online free — no sign-up, no uploads, no data sent to any server. Convert text, URLs and files to Base64 and back instantly in your browser.

Last updated: June 2026

🔒 100% client-side — your data never leaves your browser. No upload, no account.

Mode

Input

0 chars

Options

0 chars

About this tool

How to encode and decode Base64

Base64 is a way of representing binary data using 64 printable ASCII characters, so it can travel safely through channels that were built for text — embedding an image directly in a stylesheet as a data URI, putting a file inside a JSON field, or sending an attachment by email. To encode to Base64, paste your text (or drop a file) and the encoded string appears instantly; to decode Base64, switch to Decode mode and paste the string back in.

The tool supports a few practical options. URL-safe output swaps the + and / characters for - and _ so the result is safe in URLs and filenames. Line breaks every 76 characters produces MIME-compatible output for email. And the Swap button moves your output back to the input and flips the mode, so you can round-trip a value to check it.

Remember that Base64 is an encoding and not encryption — it offers no security, just a safe text representation. Everything here is computed locally in your browser with no upload and no library, so even when you encode a private file it never leaves your machine. There's no account, no limit, and no cost.

How it works

Three quick steps — no account, nothing uploaded to a server.

1

Enter your input

Paste or type your data into the tool.

2

Encode or decode

Encode text to Base64 or decode it back instantly.

3

Copy or download

Copy the result to your clipboard or download it as a file.

Was this tool helpful?

Rate this tool:

FAQ

Frequently asked questions

Is Base64 encoding the same as encryption?

No. Base64 is an encoding, not encryption — it simply represents binary data using 64 safe text characters so it can pass through systems that only handle text. Anyone can decode it back, so it provides no security or secrecy. Use it for transport and embedding, not to protect sensitive data. That said, because this tool runs entirely in your browser, whatever you encode or decode stays on your device.

What is URL-safe Base64?

Standard Base64 uses the characters + and /, which have special meaning in URLs and filenames. URL-safe Base64 replaces + with - and / with _ (and usually drops the trailing = padding), so the result can be dropped straight into a query string, path or filename without being mangled. Toggle the URL-safe option and the tool produces and accepts that variant automatically.

Can I Base64-encode a file?

Yes. Switch the input to File and drop any file up to 5 MB — an image, PDF, font or binary — and the tool reads its bytes locally and produces the Base64 string, which is exactly what you need for data URIs or embedding binary in JSON. The file is never uploaded; it's read with the browser's File API on your own machine.

Why does my decoded text look wrong?

Two common causes: the input isn't valid Base64 (a stray space, a missing character, or it was URL-safe but the option is off), or the original bytes weren't UTF-8 text at all (for example, an image). The tool decodes as UTF-8 text; if you're decoding binary data, the readable output won't make sense, which is expected. Turn on URL-safe if your string uses - and _.

What are line breaks every 76 characters for?

The MIME standard (used in email) wraps Base64 onto lines of 76 characters. Enable the line-breaks option when you need MIME-compatible output, and leave it off for a single continuous string, which is what you want for data URIs, URLs and most APIs.