URL Encoder & Decoder

Encodes a string into percent-encoded form, or decodes it back — avoids the classic pitfalls when building query strings.

Encode text to URL-encoded format (also known as "percent-encoded"), or decode from it.

Steps and notes

What is URL Encoder & Decoder — Percent-Encoding, encodeURIComponent Pitfalls?

Percent-encoding (URL encoding) replaces characters that would break a URL — spaces, &, ?, #, +, non-ASCII text — with a % followed by the byte's hex value, so a space becomes %20 and 王 becomes %E7%8E%8B. This tool uses the browser's encodeURIComponent, the same function your backend frameworks call, so its output matches what production code produces. The single most common mistake is scope: encoding a complete URL escapes the :// and ? that make it a URL. Encode values, then concatenate them into the URL — that is what "only encode the parameter values" in the notes means.

  1. Paste the raw or already-encoded string
  2. Click encode or decode
  3. Copy the result
  • Encoding a whole URL also escapes the :// — normally you should only encode the parameter values

Frequently asked questions

What is the difference between %20 and +?
Both historically mean "space" in a query string, but they belong to different encodings: %20 comes from percent-encoding, + is an application/x-www-form-urlencoded convention. encodeURIComponent produces %20. Some servers treat + literally, so when in doubt use %20 and test against the real endpoint.
Why is my decoded string full of %EF%BF%BD or garbage characters?
That byte sequence is U+FFFD, the replacement character: the text was already corrupted before encoding, typically by being stored or transmitted in the wrong charset. Percent-encoding preserves bytes, not meaning — fixing it requires finding where the encoding was first mismatched.
Should I encode the whole URL or just the parameter values?
Only the values. Encoding a full URL turns https:// into https%3A%2F%2F and destroys its structure. Build the URL first, then encode each value you insert into it — or encode the complete URL only when it is itself a value of another parameter (a redirect target, for example).

Read the full step-by-step guide for this tool

Category: Web

URL & encoding workflow

URL Encoder & Decoder — Percent-Encoding, encodeURIComponent Pitfalls → URL parser → Outlook SafeLink Decoder → Slugify string → Escape HTML entities

Read next