URL Encoder/Decoder
Encode and decode URLs, split a URL into its parts, and build query strings.
URL encoding (percent-encoding) is how a Uniform Resource Identifier (URI) carries characters it can't contain directly. Each unsafe byte becomes a "%" followed by two hexadecimal digits for the byte's value.
RFC 3986 defines it. You need it whenever a URL carries characters that mean something in URI syntax, such as &, =, ?, and #, or non-ASCII characters like accented letters and emoji.
API development
Encode query parameters and path segments for API requests
Web scraping
Decode the percent-encoded URLs you scrape
SEO
Check that URLs with special characters are encoded correctly
Debugging
Decode URL parameters to see what a request actually sent
What is URL encoding?
URL encoding, also called percent-encoding, replaces unsafe characters in a URL with a '%' followed by two hexadecimal digits. For example, a space becomes '%20' and '&' becomes '%26', so those characters aren't read as part of the URL's syntax.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URI but leaves characters like ':', '/', '?', and '&' alone, because they have special meaning in URLs. encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Use it for query parameter values.
When should I URL-encode data?
Encode any user input or special characters you put in query parameters, form data, or path segments. That comes up in API requests, form submissions, and URLs your code builds.
Why are spaces encoded as %20 instead of +?
'%20' is how RFC 3986 encodes a space in a URI. '+' for spaces comes from the application/x-www-form-urlencoded format that HTML forms use. Both work in query strings, but '%20' is the general standard.
Can I parse and rebuild a full URL with this tool?
Yes. Paste a URL into the URL Parser tab and it splits it into protocol, host, path, query parameters, and fragment. Edit any query parameter and the tool rebuilds the full URL.
Private by default
Encoding and decoding run in your browser. Your data is never sent to a server.
Related tools
JSON Formatter
Format JSON online in your browser. Paste or upload JSON to tidy it with 2 or 4 space indents, find syntax errors, minify it or browse it as a collapsible tree.
JavaScript to JSON
Convert JavaScript object literals to valid JSON
JSON Merge
Merge two JSON objects online with a deep or shallow strategy and choose how arrays combine. Useful for config files and API responses. Free, no signup.