URL Encode / Decode
Encode and decode URLs and query parameters. Handle special characters safely.
What is URL Encoding (Percent Encoding)?
URL encoding, also called percent encoding, replaces unsafe or reserved characters in URLs with a % followed by their hexadecimal value. For example, a space becomes %20 and an ampersand becomes %26. This is essential because URLs can only contain a limited set of ASCII characters.
Our tool encodes and decodes text for use in URLs, query strings, form data, and API parameters. It handles UTF-8 characters, special symbols, and all reserved URL characters correctly.
How to Use This URL Encoder/Decoder
- Paste text that you want to encode for use in a URL
- Click “Encode” to convert special characters to percent-encoded format
- Or paste an encoded URL and click “Decode” to restore the original text
- Copy the result for use in your URLs, API calls, or code
Common Use Cases
- Building API query strings — Encode parameter values that contain spaces or special characters
- Form data encoding — Encode form values for
application/x-www-form-urlencodedsubmissions - Deep linking — Encode URLs within URLs for redirect parameters or tracking links
- Debugging encoded URLs — Decode percent-encoded strings to understand what they contain
- Internationalization — Encode non-ASCII characters (Unicode, emoji) for use in URLs
Frequently Asked Questions
What’s the difference between encodeURI and encodeURIComponent in JavaScript?
encodeURI encodes a full URI but preserves characters like :, /, ?, and # that have meaning in URL structure. encodeURIComponent encodes everything except letters, digits, and - _ . ~ — use it for encoding individual parameter values.
Do I need to encode spaces as %20 or +?
Both are valid in different contexts. %20 is the standard URL encoding for spaces. + represents spaces specifically in application/x-www-form-urlencoded data (HTML form submissions). Most systems accept both, but %20 is more universally correct.
Related Tools
- HTML Encoder/Decoder — Encode characters for HTML instead of URLs
- Base64 Encoder — Encode binary data as text for URLs
- JSON Formatter — Format URL-encoded JSON API responses