URL Encode and Decode

Paste any text, query string, or URL and see the percent-encoded and decoded versions side by side, updated instantly. Nothing is sent anywhere.

URL Encode and Decode

Drop your text file here

Up to 20MB per file. Stays on this device.

Nothing is sent anywhere. Turn off your Wi-Fi and this page still works - try it.

How it works

  1. Drop or choose a .txt file, or paste text, a query string, or a URL directly into the text box.
  2. Both the percent-encoded and decoded versions render immediately - whichever direction you needed is already there.
  3. Copy or download whichever result you need. Turn on “spaces as +” if you need form-style encoding instead of %20.
Example output

Input

café & code

Output

caf%C3%A9%20%26%20code

A short piece of text with a space and an accented letter, encoded then decoded back to the original.

Frequently asked questions

Is my text sent anywhere?

No. Pasted text and uploaded files are both read and converted entirely on your device, and nothing is sent to a server. Turn off your Wi-Fi after the page loads and it still works. This page loads 11KB of JavaScript, gzipped - about what your browser's network tab will show for this page's own scripts.

Does this encode a whole URL, or just a piece of text?

Just a piece of text - a query parameter value, a search term, or any string you want to safely embed inside a URL. If you paste in a whole URL (like https://example.com/search?q=an example), the : and / characters get encoded too, because this tool treats everything you give it as one value, not as a structured URL with parts that should stay as-is. If you only need to encode the value of one query parameter, paste just that part rather than the entire URL.

Why does the decoded panel sometimes show an error?

Not every piece of text is valid percent-encoding - if what you pasted was already plain text (not something that had been encoded), decoding it back can hit a stray % with no valid hex digits after it, or a percent sequence that doesn’t form a real character. That’s expected: the encoded panel above it still shows a correct result either way.

What’s the difference between %20 and + for a space?

%20 is the standard percent-encoding for a space (RFC 3986). A literal + is an older convention from HTML form submissions (application/x-www-form-urlencoded) that many query strings still use. Turn on “spaces as +” if the system you’re working with expects that style instead.

Which characters actually get encoded?

Everything except letters, digits, and - _ . ! ~ * ' ( ) gets percent-encoded - the same unreserved-character set the browser’s own encodeURIComponent uses, so the result matches what JavaScript, and most other languages’ standard libraries, would produce.

Does this handle accented letters and emoji?

Yes. Text is encoded as UTF-8 bytes first, then each byte is percent-encoded, so café becomes caf%C3%A9 and decodes back to exactly the same text, multi-byte characters included.

Files are processed locally in your browser and never uploaded. Read more on the privacy page.