URL Encoder and Decoder
The URL encoder and decoder converts special characters to percent-encoded format or decodes any percent-encoded URL string back to readable text. Used for API query string construction, form submission debugging, and link decoding. All processing happens in your browser, nothing is sent to any server.
How to use URL Encoder and Decoder
- Select Encode or Decode mode using the toggle.
- Paste your URL or percent-encoded string into the input field.
- The result appears instantly in the output panel.
- Click Copy to copy the encoded or decoded string to your clipboard.
- Use Clear to reset both fields.
Percent encoding tool: which characters are encoded
URL encoding, also called percent encoding, converts characters that are not safe to include in a URL directly into a % followed by two hexadecimal digits representing the character's byte value. The space character becomes %20. The / character becomes %2F when it appears in a query value rather than a path separator. The percent encoding tool on this page applies encoding consistently according to RFC 3986, which defines which characters are reserved and which are unreserved.
Unreserved characters, letters A-Z and a-z, digits 0-9, and the symbols - _ . ~, are never encoded. All other characters, including spaces, slashes, ampersands, equals signs, hash marks, brackets, and non-ASCII Unicode characters such as accented letters and emoji, are encoded. When building API query strings that include user input, always encode the values to prevent characters like & and = from breaking the query string structure.
URL decoder online: converting encoded strings back
The URL decoder online converts percent-encoded sequences back to readable characters. Paste any encoded URL or query string, such as a redirect URL from an email link, an OAuth callback parameter, or a search query from server logs, and click Decode. The output shows the plain-text version of every encoded character, making encoded URLs readable and debuggable without manual lookup of each %XX sequence.
The difference between encodeURI and encodeURIComponent in JavaScript is important for which characters are encoded. encodeURI encodes characters that are not valid in a full URL but leaves URL structural characters like / ? & = : unencoded. encodeURIComponent encodes all characters that are not unreserved, including / ? & = :, and is the correct function for encoding individual query parameter values. This tool applies component-level encoding, which is suitable for encoding query values that will be concatenated into a larger URL.
Frequently asked questions
URL encoding converts characters that would break URL structure into safe percent-encoded sequences. It is required when including user-generated text in URL query strings, building redirect URIs for OAuth flows, constructing API request paths that include dynamic values, and passing special characters like & = / # through URL parameters. Without encoding, those characters would be interpreted as URL structure rather than data.
Characters that get encoded include spaces (to %20 or +), ampersands (&), equals signs (=), hash marks (#), slashes (/), colons (:), question marks (?), plus signs (+), brackets ([ ]), all non-ASCII characters including accented letters and emoji, and any control characters. Letters, digits, and the four symbols - _ . ~ are never encoded and can be included in any URL part without escaping.
encodeURI encodes a full URL string while preserving characters that have structural meaning in URLs: / ? & = : # and others. It is used for encoding a complete URL before navigating to it. encodeURIComponent encodes all characters except unreserved ones (letters, digits, - _ . ~), making it suitable for encoding individual query parameter values. Use encodeURIComponent for parameter values and encodeURI for full URL strings passed as parameters.
Paste the percent-encoded URL or string into the input field and click Decode. The tool converts every %XX sequence back to its original character and displays the decoded result. This is useful for reading redirect parameters, OAuth state values, email tracking links, and any URL that contains encoded characters that make it difficult to read in its encoded form.