Tutorial · URL Encoder/Decoder · 3 min read

URL Encoding Explained: Encode and Decode

Percent-encode a query string or path segment, decode one you received, and learn which URL characters must be escaped and why a space becomes %20 or +.

URLs allow a small set of characters. Everything else, from spaces to ampersands to non-Latin letters, must be percent-encoded as %XX bytes. Get it wrong and a query value containing & silently splits into two parameters.

What you'll learn

  • Encode a value so it is safe inside a query string
  • Decode a %-escaped string back to text
  • Know the difference between encoding a whole URL and a single component

Step by step

  1. Pick Encode or Decode

    Open the URL Encoder / Decoder and choose the mode. Output updates live.

  2. Paste the value

    Encoding treats the input as a component: reserved characters like & ? = / are escaped too, which is what you want for a query parameter value.

    a b&c=d/é  →  a%20b%26c%3Dd%2F%C3%A9
  3. Decode what you received

    Paste an encoded string to see the original. Malformed sequences such as a lone % are reported instead of silently dropped.

Open the tool with this example Runs in your browser. Nothing you paste is uploaded.

Common problems

Space became + instead of %20

Form submissions (application/x-www-form-urlencoded) use + for spaces; everywhere else in a URL, %20 is correct. Most servers accept both in query strings.

My URL was double-encoded

Encoding an already encoded value turns % into %25. Encode each component exactly once, at the point where you build the URL.

FAQ

Should I encode the whole URL?

No. Encode each component separately, then assemble. Encoding a full URL escapes the / and ? that give it structure.