URL Encoder & Decoder

Encode or decode text as a URL component (escaping reserved characters like &, =, ?, and /) or as a whole URL (leaving those characters untouched so the URL structure stays intact). When your input looks like a URL with a query string, it's automatically parsed into a readable key/value table below. All processing happens in your browser with the standard JavaScript encodeURIComponent/encodeURI functions.

PrivateFreeWorks offline

Reviewed by Vincenzo Manto, Founder & Lead Developer · Last updated September 27, 2026

How it works

  1. 1

    Paste a URL, query string, or any text into the input box.

  2. 2

    Choose Encode or Decode.

  3. 3

    Toggle 'Whole URL mode' if you're encoding/decoding a full URL rather than a single value.

  4. 4

    If your input has a query string, its key/value pairs appear in a table below.

Two encoding modes, because URLs have structure

A common mistake is running an entire URL through encodeURIComponent, which mangles the protocol and path separators along with the intended data. This tool makes the distinction explicit: use component mode for values you're inserting into a URL (like a search term with spaces), and whole URL mode for encoding or decoding a complete URL while preserving its structure.

See your query parameters at a glance

Debugging a redirect URL or an API request often means squinting at a long string of ampersands and equals signs. As soon as your input contains a query string, this tool automatically breaks it into a clean key/value table with the percent-encoding already decoded, so you can verify parameters without manually parsing the string yourself.

Frequently asked questions

What's the difference between component mode and whole URL mode?

Component mode uses encodeURIComponent/decodeURIComponent, which escapes every reserved character including &, =, ?, and /. That's correct for encoding a single value that will go inside a URL, like a query parameter. Whole URL mode uses encodeURI/decodeURI, which leaves those structural characters alone so a full URL keeps working as a URL.

Why would encoding a full URL with component mode break it?

Because encodeURIComponent escapes the slashes and colons in 'https://', turning it into 'https%3A%2F%2F...', which is no longer a usable URL. Use whole URL mode when you have a complete URL, and component mode only for individual values.

Does it upload my URL anywhere?

No. Encoding and decoding use the browser's built-in JavaScript functions and run entirely on your device.

What happens if I paste an invalid percent-encoded string and try to decode it?

You'll get a clear error explaining that the input contains a malformed escape sequence, rather than a silent failure or garbled output.

Does the query parameter table decode values automatically?

Yes. It splits the query string on & and =, then percent-decodes each key and value (also treating + as a space, matching how form submissions encode spaces) so you can read the parameters directly.

Related tools