URL Encoder & Decoder
Encode special characters for safe URL use, or decode percent-encoded strings back to readable text.
Mode Reference
- _ . ! ~ * ' ( ). Use for query parameter values.+ (HTML form submission format).About This Tool
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a %XX format where XX is the hexadecimal ASCII code. This tool supports both encodeURIComponent() (encodes everything except unreserved characters) and encodeURI() (preserves the URL structure). It also decodes percent-encoded strings back to readable text. Commonly used when constructing query parameters, handling form submissions, and working with API requests.
How to Use
- Select Encode or Decode mode.
- Paste your URL or text into the input field.
- Choose between Component encoding (for individual query values) or Full URL encoding (preserves
/,?,&). - The encoded/decoded result appears instantly. Click Copy to copy it.
Frequently Asked Questions
When should I use encodeURIComponent vs encodeURI?
Use encodeURIComponent() when encoding individual query parameter values it encodes &, =, and +. Use encodeURI() when encoding a full URL it preserves the structural characters like ://, /, and ?.
Why does a space become %20 or +?
%20 is the standard percent-encoding for space per RFC 3986. The + notation for spaces comes from the older application/x-www-form-urlencoded format used by HTML forms. Both are valid in query strings; %20 is preferred in modern APIs.
Can this decode double-encoded URLs?
Yes paste a double-encoded string and click Decode twice. Each decode pass removes one layer of encoding. Double encoding is common when URLs are embedded inside other URLs.