DevTools Hub

URL Encoder / Decoder

Encode, decode, and break apart URLs and their query strings.

Runs locally
InputText or URL
66 chars
OutputEncoded
Ready
https%3A%2F%2Fdevtoolshub.io%2Fsearch%3Fq%3Ddeveloper%20tools%26tag%3Djson%20formatter
Status
Encoded with encodeURIComponent: every reserved character is escaped.

How it works

Percent-encoding is how a URL carries characters that would otherwise break it. A space becomes %20, a slash becomes %2F, a colon becomes %3A. Decoding reverses the substitution so you can read the original value, which is what you need when you are inspecting a redirect chain, a logged request, or an OAuth callback stuffed with nested parameters.

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.

Decoding a string with a malformed escape, such as a lone % or a truncated %E2, reports an explicit error instead of quietly returning corrupted text.

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.

Frequently asked questions

What does %20 mean in a URL?
It is the percent-encoded form of a space. The character's UTF-8 byte value is 0x20, and percent-encoding writes each byte as % followed by its two hex digits. By the same rule %3A is a colon, %2F a slash, and %3F a question mark.
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.
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. It decodes percent-encoding only, which does reveal the long tracking URL hidden inside a redirect parameter.
Why does decoding fail with an invalid input error?
The input contains a percent sign that is not followed by two valid hex digits, or a multi-byte UTF-8 sequence that was cut short. A literal percent sign in text has to be encoded as %25.
Is it safe to paste a URL that contains an access token?
Yes. Encoding and decoding run in your browser using built-in JavaScript functions. The value is never sent to a server and never leaves your device.