Developer

URL Encoder / Decoder

Encode special characters for safe use in a URL, or decode a percent-encoded URL back to plain text.

How to use the url encoder / decoder

  1. Paste a URL, query string or plain text into the input box.
  2. Click Encode to percent-encode it, or Decode to reverse a percent-encoded string.
  3. Copy the result.

Features

  • Uses the standard encodeURIComponent/decodeURIComponent behaviour
  • Clear error if the input isn't valid percent-encoding
  • One-click copy

Why URLs need percent encoding

URLs use reserved characters for structure, so spaces and some symbols must be represented safely when they appear inside a path or query value. Percent encoding replaces those characters with a % followed by their byte value.

Encode only the part that needs encoding when building a URL programmatically. Encoding an entire already-structured URL can also encode separators such as : / ? and &, which changes how the address is interpreted.

When debugging a query string, decode it once before editing. Repeatedly encoding an already encoded value can produce sequences such as %2520, which represents an encoded percent sign rather than the original space.

Frequently asked questions

Spaces and many other characters aren't safe inside a URL, so they're replaced with a percent sign followed by their hex code — %20 is the code for a space.

It encodes the full input as one string, so if you only want to encode a query parameter, paste just that parameter rather than the whole URL.

Encode components, not blindly entire URLs

Percent-encoding is commonly used for query values and path components. Encoding an already encoded string can produce double-encoding, while decoding a full URL may expose reserved characters that change its meaning.

  • Encode only the component that needs safe transport when possible.
  • Watch for `%25`, a common sign that a percent sign was encoded again.
  • Do not confuse URL encoding with encryption or access control.

Related reading: What “runs in your browser” means for privacy