URL
URL Encoder / Decoder
Keep text from breaking URLs by safely encoding or decoding it.
Uses standard URL encoding so queries and paths stay intact.
Input
Output
What
URL Encoder / Decoder definition
URL encoding converts unsafe characters into percent-encoded form so they travel safely in URLs.
Cases
Use Cases
1
Encode query parameter values
2
Decode percent-encoded strings from logs
3
Prepare path segments with spaces or symbols
How To
How to URL-Encode or Decode Text
A step-by-step guide to safely converting query values and path segments.
1
Enter text
Paste the text you want to encode or decode into the input field.
2
Select mode
Choose URL encode or URL decode.
3
Copy result
Copy the output and use it in your URL, code, or request.
Knowledge
Understanding URL Encoding
What is URL Encoding?
URL encoding (percent-encoding) converts characters into a format that can be transmitted over the Internet. Unsafe characters are replaced with '%' followed by two hexadecimal digits representing the character's ASCII code.
Reserved Characters
Certain characters have special meanings in URLs: '?' starts query strings, '&' separates parameters, '#' marks fragments, '/' separates path segments. These must be encoded when used as data values, not as delimiters.
Safe Characters
Alphanumeric characters (A-Z, a-z, 0-9) and some special characters (-, _, ., ~) are 'safe' and don't require encoding. All other characters should be percent-encoded for reliable URL transmission.
UTF-8 and URL Encoding
Modern URL encoding uses UTF-8. Non-ASCII characters are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, '한' becomes '%ED%95%9C' (its UTF-8 byte sequence).
Common Encoding Examples
Space becomes '%20' or '+' (in form data), '&' becomes '%26', '=' becomes '%3D', and '?' becomes '%3F'. Understanding these helps debug URL-related issues in web applications.
FAQ
URL encoder FAQ
When should I URL-encode text?
Encode when placing dynamic values into query strings or path segments so spaces and symbols are preserved safely.
What characters get encoded?
Spaces turn into %20 and reserved characters like ?, &, #, and = get escaped so the URL stays intact.
Why would decoding fail?
Decoding throws errors if percent signs aren't followed by two hex characters or if the sequence is incomplete.
How is encoding a query value different from encoding a full URL?
Query values use stricter escaping, while full URLs can leave ?, & and similar characters as-is.
What do encoding and decoding mean?
Encoding converts characters into percent-escaped byte sequences so they travel safely in URLs; decoding reverses them back to readable text.
What is a URL?
A URL (Uniform Resource Locator) is the address of a resource on the web, including protocol, domain, path, and optional query parameters.