URL Encode / Decode
Encode or decode URL components
What is URL Encoding?
URL encoding, also known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI). Certain characters are not allowed in URLs or have special meanings. URL encoding replaces these characters with a % followed by two hexadecimal digits representing the character's ASCII code. For example, a space becomes %20.
Characters That Must Be Encoded
- Reserved characters — Characters like
:,/,?,#,&,=have special meanings in URLs and must be encoded when used as data. - Unsafe characters — Spaces, quotes,
<,>, and{}should always be encoded. - Non-ASCII characters — Unicode characters, emoji, and international text must be encoded as UTF-8 bytes then percent-encoded.
- Control characters — Characters in the ASCII range 0-31 are not allowed in URLs and must be encoded.
Common Use Cases
- Query parameters — Encode search queries, form data, and filter values passed in URL query strings.
- REST API calls — Encode path segments that contain special characters or spaces.
- Redirect URLs — Encode the target URL when it is passed as a parameter in redirect links.
- Internationalized URLs — Convert non-ASCII domain names and paths to valid ASCII-only URLs.
URL Encoding vs. URL Decoding
Use the Encode button to convert your text into a safe URL component. Use the Decode button to convert percent-encoded strings back into their original human-readable form, which is useful when debugging URLs or reading encoded query parameters in logs.