URL Encoder & Parser
Encode text for URLs, or break a URL into its parts and decoded query parameters.
https%3A%2F%2Fdevtoolshub.io%2Fsearch%3Fq%3Ddeveloper%20tools%26tag%3Djson%20formatter
How it works
Percent-encoding is how a URL carries characters that would otherwise break it. Encoding writes each unsafe character as % followed by the hex value of its UTF-8 bytes, so a space becomes %20, an ampersand %26, and an equals sign %3D, and a value can sit inside a query string without being mistaken for its structure.
Encoding offers both of the browser's own functions. Component scope uses encodeURIComponent and escapes every reserved character, including / : ? & and =, which is what a single query-string value needs. Full URL scope uses encodeURI, which leaves those characters intact so a whole address stays usable.
Inspect mode splits a URL into protocol, host, port, path, and fragment, and lists every query parameter with its value already decoded, which is the quickest way to read a long callback or tracking URL. Repeated keys are kept, and an address pasted without a scheme is parsed as https.
Decode mode is here too, and the URL Decoder page opens with it already selected.
Frequently asked questions
- What is the difference between encodeURIComponent and encodeURI?
- encodeURIComponent escapes reserved characters such as / ? : @ & = + $ and #, so it is the right choice for a single parameter value. encodeURI leaves those intact because it is meant for a complete URL. Both are available here through the Component and Full URL switch in encode mode.
- Which characters does URL encoding leave unchanged?
- Letters, digits, and the marks - _ . ! ~ * ' ( ) pass through encodeURIComponent untouched. Everything else, including spaces, accented letters, and emoji, is written as one or more percent escapes.
- Should a space be encoded as %20 or +?
- Use %20. It is valid in every part of a URL, and it is what encodeURIComponent produces. The + form only means a space in HTML form submissions and is read as a literal plus sign almost everywhere else.
- Can it expand a shortened link such as bit.ly?
- No. Expanding a short link requires an HTTP request to the shortener to see where it redirects, and this tool never makes network requests. Inspect mode does decode the long tracking URL hidden inside a redirect parameter.
- Is it safe to paste a URL that contains an access token?
- Yes. Encoding, decoding, and parsing run in your browser using built-in JavaScript functions. The value is never sent to a server and never leaves your device.