URL Encoder & Decoder — Encode and Decode URLs Instantly

Real-time, side-by-side URL encoding and decoding. Switch between encodeURIComponent and encodeURI for query params vs full URLs — runs entirely in your browser.

Encode and decode side-by-side in real time — switch between encodeURIComponent and encodeURI for query params vs full URLs.

Encode

Mode
Input
Encoded output
Type or paste here to see the encoded result.
0 ch in → 0 ch out

Decode

Input
Decoded output
Paste a percent-encoded URL to see the decoded result.
0 ch in → 0 ch out

How to Use

  1. Pick the right panel Use the Encode panel (left) to convert raw text into URL-safe percent encoding, or the Decode panel (right) to read a percent-encoded URL back into plain text.
  2. Paste your input Type or paste into the panel’s input. The output updates instantly as you type — no button click needed. Use the Mode toggle to choose between encodeURIComponent (for query parameters and path segments) and encodeURI (for full URLs).
  3. Copy the result Click Copy beside the output to send the encoded or decoded text to your clipboard. The character count under each panel shows how the size changed.

Why Use This Tool

Every URL on the web is governed by a strict set of reserved characters — ?, &, =, #, /, and the humble space — that have structural meaning. The moment you embed user input, file names, search queries, or non-ASCII text into a URL, those characters need to be escaped into their percent-encoded form (%20 for space, %26 for ampersand, and so on) or the request silently breaks in surprising ways.

Picking the right encoder matters. encodeURIComponent is the safe default for any single piece of a URL — a query parameter value, a path segment, an OAuth state token. encodeURI is for an entire pre-built URL where you want to leave the structure intact. Mixing them up is one of the most common bugs in client-side URL building, which is why this tool exposes both modes side-by-side instead of hiding one behind the other.

Going the other direction — decoding a percent-encoded URL back into something readable — is just as useful when you're debugging a redirect chain, reading a server log, or inspecting a referrer header. Paste the raw string in, get the original characters back, and copy either side of the conversion to your clipboard. Everything happens in your browser, so the URLs you paste are never sent to a server.

Frequently Asked Questions

URL encoding (also called percent encoding) replaces unsafe or reserved characters in a URL with a percent sign followed by their hex byte value. For example, a space becomes %20, a hash becomes %23, and an ampersand becomes %26. This makes the URL safe to transmit over HTTP, where certain characters have reserved structural meaning.
You need to URL-encode whenever you build a URL from user input or arbitrary text — query string parameters, path segments, form submissions, API requests, redirect URLs, and mailto links. Without encoding, characters like &, ?, #, =, /, and spaces will be misinterpreted as URL delimiters and break the request or produce wrong results.
encodeURI() is for entire URLs and leaves URL-structure characters intact (: / ? & = #). encodeURIComponent() is stricter — it encodes those structural characters too, so it's the right choice for a single piece of a URL like a query parameter value or path segment. Rule of thumb: use encodeURIComponent for any value you're inserting into a URL, and encodeURI only when escaping a complete URL that's already correctly structured.
Yes. Paste the full query string or a single parameter value (like name=John%20Doe%26Sons) into the decode panel — it converts every percent sequence back to its original character. One thing to know: form-encoded data (application/x-www-form-urlencoded) uses + to represent a space, while standard URL encoding uses %20. This tool decodes %20 correctly; if you also need + decoded as space, replace + with %20 before pasting.

Related Tools