S
SeniorTools

Free Online URL Encoder / Decoder

Percent-encode special characters in URLs and query parameters, or decode percent-encoded strings back to readable text. Essential for building and debugging HTTP requests.

Raw Text / URL
Encoded Output

What is URL Encoding?

URL encoding (also called percent-encoding) converts characters that are not allowed in a URL into a %XX format where XX is the hexadecimal byte value. For example, a space becomes %20 and an ampersand becomes %26.

This tool uses the encodeURIComponent / decodeURIComponent functions, which encode every character except letters, digits, and - _ . ! ~ * ' ( ). This is the correct approach for encoding individual query parameter values.

How to Use the URL Encoder

  1. Select the modeEncode to add percent-encoding, or Decode to remove it.
  2. Paste your text or URL into the left field.
  3. Click Encode URL / Decode URL to process. The result appears on the right.
  4. Use Swap to send the output back as new input and toggle the mode.

Common Use Cases

  • Query string building: Safely encode user-supplied values before appending them to a URL as ?key=value parameters.
  • API request construction: Encode path segments or query values that contain slashes, spaces, or special characters.
  • URL troubleshooting: Decode an encoded URL from a log or browser address bar to see the original readable string.
  • Form data encoding: Encode form field values forapplication/x-www-form-urlencoded bodies.