URL Encoder / Decoder
Encode and decode URL components, full URLs, and query strings using standard browser APIs.
Both representations
Hello World! Special chars: &=?#Hello%20World!%20Special%20chars%3A%20%26%3D%3F%23A URL encoder is a tool that converts special characters in a URL such as spaces, ampersands, and non-ASCII letters into a percent-encoded format that web browsers and servers can safely parse and transmit. Developers use URL encoders when building query strings, constructing API requests, or debugging URLs that contain user-supplied data. AlteredIdea's URL encoder and decoder runs entirely in your browser: no URL or parameter value is sent to any server.
Free online URL encoder and decoder
URLs can only contain a limited set of ASCII characters. Any special characters: spaces, ampersands, equals signs, non-ASCII letters: must be percent-encoded before they can appear in a URL. This tool provides three modes: encode/decode individual component values, encode a full URL while preserving its structural characters, and parse and encode all parameters in a query string at once.
The Full URL mode is particularly useful for debugging API calls or webhook URLs: it shows you a breakdown of each URL component (protocol, host, path, query, hash) and which parts were encoded. The Query String mode parses each key-value pair into a table so you can see exactly how a complex query string is structured. All encoding uses the browser's native APIs, matching what your application's HTTP client does.
Step-by-step guide
- 1Choose a mode
Select Component to encode/decode a single value, Full URL to encode an entire URL preserving its structure, or Query String to encode all parameters in a query string. - 2Paste your input
Enter the text, URL, or query string into the input field. Sample values are pre-loaded to demonstrate the tool immediately. - 3Select Encode or Decode
In Component mode, toggle between Encode and Decode. The Full URL and Query String modes always show both the encoded and decoded representations. - 4Review the output
The output and breakdown appear instantly. In Full URL mode you can see which parts of the URL were encoded and which were preserved. - 5Copy the result
Use the Copy buttons next to each output field to grab exactly the value you need.
Related Tools
JSON Formatter
Validate, format, minify, and explore JSON. Syntax highlighting, error detection, and tree view.
SQL Formatter
Format SQL queries with keyword casing, indentation, and clause alignment.
Regex Tester
Test regular expressions with live matching, group capture, flags, and match highlighting.
Base64
Encode and decode Base64 strings and files. Supports text, binary, and data URLs.
Frequently Asked Questions
- What is URL encoding?
- URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a safe representation using a % followed by two hex digits. For example a space becomes %20 and & becomes %26.
- What is the difference between encodeURIComponent and encodeURI?
- encodeURIComponent encodes all characters except letters, digits, and - _ . ! ~ * ' ( ). It is used for individual parameter values. encodeURI preserves characters that have structural meaning in a URL (like / : ? & =) and is used for full URLs.
- When should I use the Component tab vs Full URL tab?
- Use Component to encode a single value you want to pass as a URL parameter (e.g. a search term). Use Full URL when you have a complete URL with path segments and query parameters that need normalised encoding.
- Is my data sent to a server?
- No. All encoding and decoding uses the browser's native encodeURIComponent, encodeURI, decodeURIComponent, and URLSearchParams APIs. Nothing leaves your device.
- What does the Query String tab do?
- It parses a query string (with or without the leading ?) into key-value pairs, shows each pair decoded and encoded, and outputs the fully encoded and decoded query string for easy copying.
- Why does a space encode to + in some tools but %20 in others?
- The + encoding for spaces is from HTML form encoding (application/x-www-form-urlencoded). Standard percent-encoding (RFC 3986) uses %20. This tool uses %20 via encodeURIComponent, which is the correct form for URL query parameter values.
- Can I decode a URL that has been double-encoded?
- Paste the double-encoded URL into the Component Decode tab. One press of Decode will remove one level of encoding. Decode again to remove the second level if needed.
- What characters are safe in a URL without encoding?
- Unreserved characters are safe without encoding: A–Z, a–z, 0–9, and the symbols - _ . ~. All other characters must be percent-encoded when used in query parameter values.
- How do I encode a URL with spaces and special characters?
- Use the Component tab, paste your value (for example a search query with spaces, ampersands, or non-ASCII characters), and click Encode. Spaces become %20, ampersands become %26, and so on. Copy the encoded result to use safely as a URL parameter value.
- Why does my API request fail when the URL contains certain characters?
- Characters like &, =, ?, #, and spaces have special meaning in URLs. When they appear in parameter values without encoding, the server misparses the URL structure. Encode each parameter value individually (not the whole URL) using the Component tab, then reconstruct the full URL.
AlteredIdea vs alternatives
vs server-side tools: Everything runs in your browser: your data never leaves your device.
vs VS Code extensions: No install needed. Works instantly in any browser.
vs paid tools: Completely free, no account required.