URL Encoder / Decoder
Encode or decode URLs and query strings instantly
Examples
What is URL Encoder / Decoder?
URL encoding (also called percent-encoding) converts characters that are not allowed in URLs — spaces, &, =, ?, #, and non-ASCII characters — into a safe format that can be transmitted over the internet. Each unsafe character is replaced by a percent sign followed by its two-digit hexadecimal ASCII code (e.g., space becomes %20, & becomes %26).
URLs can only contain a limited set of ASCII characters. When you include a user's name, a search query, a file path, or text in another language in a URL, those characters must be encoded or the URL will be misinterpreted by servers and browsers. For example, a query string parameter containing an & would prematurely terminate the parameter, and a space would invalidate the URL entirely.
Altairys's URL Encoder/Decoder supports two modes: 'encodeURIComponent' (encodes everything except unreserved characters — used for individual query parameters) and 'encodeURI' (encodes a complete URL, preserving structural characters like /, ?, #). This distinction is important for web developers building APIs, URL parsers, and query string handlers. The tool also handles international URLs containing Chinese, Arabic, Hindi, and other scripts by encoding them using UTF-8 percent-encoding.
How to Use URL Encoder / Decoder
- Paste your URL or string
Enter the URL, query parameter, or string you want to encode or decode.
- Choose encoding mode
Select Full URL (encodeURI) or Component (encodeURIComponent) based on your use case.
- Encode or decode
The result appears instantly — toggle between Encode and Decode modes.
- Copy the result
Copy the encoded/decoded URL to clipboard and use it in your application.
Key Benefits
Results update in real time — no need to click a button.
Correctly encodes non-ASCII characters including Hindi, Chinese, and Arabic scripts.
Full URL mode and component mode for different use cases.
Invaluable when building APIs, redirects, tracking parameters, and query strings.
Frequently Asked Questions
Use encodeURI() for encoding a complete URL — it preserves /, ?, #, :, and other URL structure characters. Use encodeURIComponent() for individual parameter values — it encodes everything except letters, digits, -, _, ., ~.
Both are valid depending on context. %20 is the percent-encoding standard for spaces in URLs. The + sign for spaces is used in HTML form data (application/x-www-form-urlencoded), not in standard URL paths.
Yes. The tool handles UTF-8 percent-encoded sequences that represent any Unicode character, including all international scripts.
Yes. Paste the full query string and choose the appropriate mode. Each & is preserved in Full URL mode, and encoded in Component mode.