This page's code did not start.

Opening index.html directly from a folder blocks JavaScript modules, so nothing will happen when you choose a file. Serve the folder over http instead:

powershell -ExecutionPolicy Bypass -File serve.ps1

Then open http://localhost:8080/.

Base64 Encoder & Decoder — and URLs, HTML entities, hex and escapes

Base64, percent-encoding, HTML entities, hex and backslash escapes, both ways. Nothing is pasted into anyone else's server.

Language: English
View source
Your text are processed in your browser. No processing upload.

Every encoding here is arithmetic over a string, done here, in this page. The codecs are hand-written and in src/encode.js — and there is nothing else. This tool has no network feature of any kind — nothing to fetch, nothing to send — which matters more here than almost anywhere: the thing people paste into an online Base64 decoder is a token, and pasting a token into somebody's website is handing it over.

Live check: checking…

Offline: checking…

Don't take our word for it: open DevTools, watch the Network tab, and decode something. Not one request carries a character of what you pasted. Or unplug from the internet and decode it anyway.

1 Pick the encoding

Which way

2 Paste it in

empty

3 Take the result

Nothing yet.

 

View as Markdown

How to encode or decode Base64 without uploading it

  1. Pick the encoding. Base64 in both alphabets, percent-encoding for a single value or a whole URL, the five HTML entities, hex bytes, and the backslash escapes a string literal uses. The note under the menu says what each one is for.
  2. Pick the direction. Encode takes plain text and produces the encoded form; Decode takes the encoded form back to plain text. The result updates as you type, so switching direction is one click and no retyping.
  3. Paste it in, or drop the file. Anything you can select and copy works. A file dropped on the picker is read by your own browser and put in the box — there is no upload step to leave out.
  4. Read the error if there is one. A decoder that fails here says what it found — a character Base64 does not use, padding in the wrong place, bytes that are not text — rather than returning something plausible and wrong.
  5. Take the result. Copy it, or download it as a text file. The counts under the box say how many bytes went in and how many came out.

The longer version

Is base64 encryption? No - and the difference matters in practice. Encoding, encryption and hashing solve three different problems: one anybody can reverse, one the key holder can reverse, one nobody can. Which is which, and how to tell on sight.

Questions

Is my text uploaded anywhere?

No. Every encoder and decoder on this page is a function that runs in your own browser, on your own hardware. This tool has no network feature of any kind — it never fetches anything and never sends anything — and the page's Content-Security-Policy names every address it may contact, none of which belongs to this site. That is the reason to use it for an access token or a session cookie: pasting one of those into somebody else's decoder is giving it to them.

Is Base64 here the same Base64 as everywhere else?

Yes — it is checked against the test vectors in RFC 4648 rather than against itself. Both alphabets decode, so a JWT written with - and _ reads as easily as one written with + and /, and input wrapped at 64 characters is unwrapped for you. Encoding is by UTF-8 bytes, so an accented letter or an emoji survives the round trip.

Is Base64 encryption?

No, and treating it as encryption is the classic mistake. Base64 is a spelling: the same bytes written in an alphabet that survives being put in a URL, an email or a JSON string. Anyone can read it back — this page does it in a millisecond — so it hides nothing and protects nothing. If what you have is secret, it needs actual encryption before it is encoded, not instead of it.

Why did decoding fail?

Because what was pasted is not quite what the codec was told it was, and the error says which way: a character outside the Base64 alphabet, padding in the wrong place, a percent sign with no two hex digits after it, or bytes that decode from Base64 but are not UTF-8 text — which usually means the original was a file rather than a string. The browser's own atob would have returned something plausible instead; being told is the whole point of pasting something into a decoder.

What is the difference between the two web-address encodings?

One value, or the whole address. Encoding one value escapes everything a URL gives a meaning to — slashes, question marks, ampersands — which is what you want for a single query-string parameter. Encoding a whole URL leaves the address working: the slashes and the ? stay, and only the characters a URL cannot carry at all are escaped. Using the first on a whole address breaks the address; using the second on a value loses where the value ends.

How big a file can it handle?

There is no limit set here, because there is no server paying for one. The practical ceiling is your own machine: a few megabytes of text is fine, and the page waits for a pause in your typing before it re-encodes a very long document rather than fighting you for the keyboard.

Is it free, and do I need an account?

It is free, and there is no account, no sign-in, no trial and no limit on how much you paste. The site carries advertising, which is what pays for it; the ads are not given anything about your text.

Does it work offline?

Yes. Load the page once, then disconnect from the internet and it keeps working. That is also the simplest way to prove nothing is being uploaded: a tool that sent your text away to be decoded would stop the moment you unplugged.