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
- Select the mode — Encode to add percent-encoding, or Decode to remove it.
- Paste your text or URL into the left field.
- Click Encode URL / Decode URL to process. The result appears on the right.
- 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=valueparameters. - 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 for
application/x-www-form-urlencodedbodies.