URL Encode
Encode Query Strings and Special Characters
URL encoding converts special characters into percent-encoded values so URLs can be transmitted safely. It is commonly used for query parameters, form data, and API requests.
URL encoding, also called percent-encoding, replaces reserved or unsafe characters with a "%" followed by two hexadecimal digits, such as space becoming %20. This keeps URLs valid and unambiguous.
Use encoding when you are building a query string or passing values to an API endpoint.
Use the encoder with these steps:
- Paste text or a query parameter value into the input editor.
- Click "URL Encode".
- Copy the encoded output on the right.
URL encoding is useful when you need to:
- Build valid query strings for links and APIs.
- Safely include special characters like spaces, &, or #.
- Normalize values before logging or storing URLs.
Certain characters should be encoded in URLs to avoid ambiguity. Examples include:
| Character | Encoded Value |
|---|---|
| Space | %20 |
| " | %22 |
| # | %23 |
| % | %25 |
| & | %26 |
| + | %2B |
| / | %2F |
| ? | %3F |
References for percent-encoding and URL syntax:
- Encode query parameter values, not the full URL, to keep ?, =, and & readable.
- Encode path segments separately and keep / between segments.
- Use UTF-8 input for accented characters and emoji before encoding.
- Decode once when troubleshooting logs to avoid double-encoding.
- When a value already contains %, confirm it is not already encoded.
If a link still breaks, compare the raw and encoded values side by side to confirm which characters changed.