Konverter
URL Encoder / Decoder
The URL Encoder converts special characters in URLs to their percent-encoded form (e.g. space becomes %20 or +) and decodes percent-encoded strings back to plain text. It supports three encoding modes: full URL encoding (preserves URL structure), query string encoding (encodes spaces as +), and component encoding (encodes everything except unreserved characters). It is essential for safely passing parameters in HTTP requests and constructing API URLs.
What is URL encoding (percent encoding)?
URLs can only contain a limited set of safe ASCII characters. Characters outside this set – including spaces, accented letters, symbols like &, =, and #, and non-ASCII Unicode characters – must be percent-encoded to be safely transmitted in a URL. Percent encoding replaces each unsafe byte with a % sign followed by two hexadecimal digits representing the byte value (e.g. space = 0x20 = %20). RFC 3986 defines the set of unreserved characters that do not need encoding (A–Z, a–z, 0–9, –, _, ., ~). All other characters in a URL component should be percent-encoded.
How does the tool work?
In encode mode, the tool processes the input string character by character. In 'component' mode (encodeURIComponent equivalent), every character except the 66 unreserved characters is percent-encoded. In 'full URL' mode (encodeURI equivalent), reserved characters that have special meaning in URL structure (/, ?, #, @, :, etc.) are preserved. In 'query string' mode, spaces are encoded as + (the application/x-www-form-urlencoded convention) rather than %20. In decode mode, all %XX sequences are decoded to their byte values, which are then interpreted as UTF-8 to reconstruct the original Unicode string.
Typical Use Cases
- Encoding query string parameter values containing special characters before appending them to a URL
- Decoding percent-encoded URLs from log files or browser address bars for readability
- Constructing API request URLs with properly encoded path segments and query parameters
- Debugging URL routing issues caused by improperly encoded or double-encoded characters
Step-by-step Guide
- Step 1: Paste the text or URL you want to encode or decode into the input field.
- Step 2: Select the encoding mode: Component, Full URL, or Query String.
- Step 3: The encoded or decoded output appears instantly.
- Step 4: Copy the result for use in your code or browser.
Example
Input
hello world & more=info
Output
hello%20world%20%26%20more%3Dinfo (component mode)
Tips & Notes
- Use 'component encoding' (encodeURIComponent) for individual query parameter values; use 'full URL encoding' (encodeURI) for entire URL strings.
- Watch out for double encoding: if you encode an already-encoded string, %20 becomes %2520. Always decode first before re-encoding.
- Spaces in query strings have two valid encodings: %20 (RFC 3986) and + (HTML form convention). The + form only works in query strings, not in path segments.
Frequently Asked Questions
What is the difference between %20 and + for spaces in URLs?
%20 is the percent-encoded representation of a space per RFC 3986 and is valid everywhere in a URL. The + symbol represents a space only in the query string portion under the application/x-www-form-urlencoded encoding convention used by HTML forms. Using + in a path segment would be interpreted as a literal plus sign.
Do I need to URL-encode the entire URL or just parts of it?
Only the components (path segments, query values, fragment) need encoding – not the structural characters (://, /, ?, &, =) that define the URL structure. Use encodeURIComponent on individual values and encodeURI on the full URL string.
How are non-ASCII characters URL-encoded?
Non-ASCII characters are first encoded as UTF-8 bytes, and then each byte is percent-encoded. For example, the German 'ü' (U+00FC) encodes to two UTF-8 bytes (0xC3, 0xBC), which percent-encode to %C3%BC.
URL Encoder / Decoder
Encode text into URL format (percent-encoding) and decode it back — live and bidirectional.
Open Tool