QQuickLab

Base64 & URL Encoder/Decoder

Convert text to and from Base64, URL percent-encoding, HTML entities and Unicode escapes.

Everything you enter stays in this browser and is never sent to a server.

Five common conversions in one place. Text is converted to UTF-8 first, so emoji and non-Latin scripts survive the round trip. (The browser’s built-in btoa throws an error on anything outside Latin-1.)

How to use

  1. Pick a conversion.
  2. Enter text and press Encode or Decode.
  3. Chain conversions with Use result as input.

URL component vs full URL

Use URL component (encodeURIComponent) for a single query value; it escapes /, ?, & and =, so a value containing them can’t break the address. Use Full URL (encodeURI) for an entire address; it keeps the structure and only escapes things like spaces and non-ASCII characters.

Base64 is not encryption

Anyone can decode Base64. Never use it to hide secrets.

What the output looks like

Base64 turns every 3 bytes into 4 characters. Hello becomes SGVsbG8=; the trailing = is padding to fill out the last group. The Korean word 한글 is 6 bytes in UTF-8 and becomes 7ZWc6riA. That’s why Base64 data is about 33% bigger than the original.

Encoding 한글 a&b=c as a URL component gives %ED%95%9C%EA%B8%80%20a%26b%3Dc: each Hangul character is three UTF-8 bytes, so three %XX groups. When decoding a URL component, + is read as a space, as in form submissions.

HTML entities escapes & < > " ' as &amp; &lt; &gt; &quot; &#39;. Decoding also understands named entities like &nbsp; and numeric ones like &#44032;. Unicode escape leaves ASCII alone, writes 한 as \ud55c, and writes characters beyond the basic plane, like 😀, as \u{1f600}.

Common mistakes

Encoding an already-encoded URL turns % into %25, so %ED becomes %25ED. Lots of %25 in an address means it was encoded twice. Going the other way, encoding a search term with Full URL leaves & and = untouched, and the value gets cut off.

FAQ

Does URL-safe Base64 work?

Yes, - and _ are accepted when decoding, and missing = padding and line breaks are handled for you.

Why does Base64 decoding fail?

Usually the string was cut off, contains characters that aren’t Base64, or the original data was binary (an image, a zip) rather than text. This tool only shows results that decode to valid UTF-8 text.

Can I encode files?

Not at the moment; it works on text only.

More tools in this category

All tools →