Base64 Encoder & Decoder

🔒 Processed 100% in your browser — nothing is uploaded

About this tool

Base64 appears everywhere once you start looking for it: inline images in CSS and HTML (data URIs), HTTP Basic authorization headers, the header and payload segments of every JWT, binary blobs inside JSON payloads, and the guts of email attachments. Developers reach for an encoder constantly — and most quick online tools quietly break on real-world text, because the browser's built-in btoa() cannot handle characters outside Latin-1.

This encoder and decoder handles both text and files, entirely on your machine. Type or paste text and get instant Base64 with proper UTF-8 handling — accented characters, CJK text and emoji encode correctly, unlike naive btoa-based tools. Flip the URL-safe switch to get the RFC 4648 alphabet with dashes and underscores instead of plus and slash, exactly what JWTs and URL parameters require. Decoding validates the input and reports exactly where invalid characters break, instead of failing silently. For files, drop any file and receive its Base64 — useful for small assets you want inline — or paste Base64 to download the decoded file.

Two practical cautions keep you out of trouble. First, Base64 inflates data by about a third — three bytes become four characters — so inlining anything beyond small icons bloats your CSS or HTML for no benefit; real static assets belong on a CDN. Second, Base64 is an encoding, not encryption: anyone can reverse it instantly, so prefixing a key with 'Basic ' or hiding a token in Base64 protects nothing. If you need secrecy, you need encryption and key management, not a string format.

Nothing is uploaded: the conversion uses local browser APIs, so credentials and internal data stay private. It is a small tool that removes a daily friction point for developers — correctly.

How to use Base64 Encoder & Decoder

  1. Type or paste text into the input, or drop a file onto the page.
  2. Choose Encode or Decode, and toggle URL-safe mode if needed.
  3. The result appears instantly with correct UTF-8 handling.
  4. Copy the output or download the decoded file.

Frequently asked questions

Does it handle non-ASCII text?

Yes. Full UTF-8 support means Chinese, Arabic, emoji and accented characters encode and decode correctly.

What is URL-safe Base64?

A variant that replaces + and / with - and _ so the result can sit safely inside URLs and filenames — used by JWTs, for example.

Is there a file size limit?

No hard limit, though very large files make huge Base64 strings; a few hundred megabytes works fine on a modern machine.

Is my data uploaded?

No. Encoding and decoding run locally in your browser; nothing ever leaves your device.

Is Base64 a form of encryption?

No. It is a reversible encoding that anyone can decode instantly. Never use Base64 to protect passwords, API keys or any secret — it provides zero security.

Why does Base64 make data bigger?

Every three bytes of input become four characters of output — roughly 33% overhead. That is why inlining large images as data URIs is a bad idea and real assets belong on a CDN.

Why do some Base64 strings end with = signs and others don't?

The = characters are padding, added only when the input length requires them. JWTs strip the padding; the URL-safe toggle here matches what those systems expect.