URL Encoder & Decoder
Encode or decode URI components for safe use in web addresses, query parameters, and API requests.
How to use this tool
- Select Encode or Decode mode.
- Enter the text or URL-encoded string in the input area.
- Click Convert to see the result.
This tool uses encodeURIComponent() for encoding and decodeURIComponent() for decoding. These functions encode/decode individual URI components (such as query parameter values), not entire URLs.
URL encoding vs. full URL encoding
encodeURIComponent() encodes a component of a URI — such as a query parameter value. It encodes characters like =, &, ?, /, and # that have special meaning in URLs.
encodeURI() encodes a full URI and preserves characters like /, :, ?, #, and & that are part of the URL structure. This tool uses encodeURIComponent() because encoding individual components is the most common use case.
Frequently asked questions
URL-encode text when embedding it as a query parameter value, form field, or any part of a URL that may contain special characters (spaces, ampersands, equals signs, etc.). For example, a search query like "hello world" becomes "hello%20world".
A decoding error occurs when the input contains malformed percent-encoded sequences, such as %ZZ (Z is not a valid hexadecimal digit) or an incomplete sequence like %2. Valid percent-encoding uses % followed by exactly two hexadecimal digits.