URL Encoder & Parser
Encode or decode URL components and break a URL into its parts and query parameters.
Encode / decode
Type or paste text; the output updates live. Swap moves the output back to the input and reverses the mode. Ctrl/⌘ + Enter runs again.
URL parser
Enter a URL to break it into its parts.
Components
Query parameters
| # | Key | Value |
|---|
This URL has no query parameters.
How URL encoding works
A URL may only contain a limited set of ASCII characters. Anything else, including spaces, Chinese characters and reserved symbols such as &, = and ?, must be percent-encoded: the text is converted to UTF-8 bytes and each byte is written as % plus two hexadecimal digits, so a space becomes %20 and 台 becomes %E5%8F%B0. This tool runs the browser’s own encodeURIComponent, encodeURI, decodeURIComponent and decodeURI functions, so the result is exactly what JavaScript produces. The parser below uses the standard URL API to split an address into protocol, credentials, host, port, path, query string and fragment, and lists every query parameter with its decoded key and value, including repeated keys.
Which mode should I use?
- encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single query value or path segment.
- encodeURI keeps the characters that give a URL its structure (: / ? # & = + @ ;). Use it to clean up a complete URL.
- Decoding fails on malformed input such as a % not followed by two hex digits; the tool reports this instead of producing garbage.
- In query strings a + usually means a space (form encoding), so the parser shows q=iPhone+15 as "iPhone 15". encodeURIComponent writes spaces as %20 and never produces +.
- International domain names are shown in Punycode (xn--…), which is how browsers send them.
Privacy
Everything happens in your browser. URLs you paste, including any tokens or passwords they contain, are never sent anywhere.