URL Encoder & Decoder

Percent-encode or decode text for a URL component or a full URL, with clear errors for malformed % sequences.

Options

Input

Ctrl + Enter to run

Result

Apply or undo percent-encoding (%XX) for URLs. “Component” mode encodes everything that is unsafe inside a parameter or path segment (including &, =, / and ?), like encodeURIComponent. “Full URL” mode keeps characters that have meaning in a URL, like encodeURI.

When decoding, incomplete % sequences and bytes that are not valid UTF-8 are detected instead of returning corrupted output.

How to use it

  1. Choose Encode or Decode.
  2. Choose the scope: component or full URL.
  3. For form data, tick “"+" as space” when decoding.
  4. Press Run.

Example

Example input
nombre=José & ciudad=A Coruña/España
Result
nombre%3DJos%C3%A9%20%26%20ciudad%3DA%20Coru%C3%B1a%2FEspa%C3%B1a

Limitations

  • It does not parse the URL: use the URL parser to see its parts.
  • Non-ASCII characters are always encoded as UTF-8.

FAQ

When do I use component vs. full URL?
Use component for a parameter value (?q=value) or a path segment. Use full URL only when you have a whole URL with non-ASCII characters and want to keep its structure.
Why %20 and not +?
+ as space is only valid in application/x-www-form-urlencoded. Elsewhere in a URL a space is encoded as %20.

Related tools

References