CalcHub

URL Encoder, Decoder & Analyzer — Parse Any URL

Percent-encode or decode strings, and break any URL into protocol, host, path, query params and fragment — decoded params listed cleanly.

Waiting
Paste content above
The tool runs instantly, entirely in your browser.

Last reviewed 2026-10-19. Rates change — verify against the official sources linked below before relying on these figures.

What this is based on

  • Analyze mode parses via the WHATWG URL parser (same as your browser's new URL()).
  • Encode uses encodeURIComponent — safe for query values, encodes reserved characters like / : ? & =.
  • Everything runs locally in your browser — pasted content is never uploaded, logged or stored.

encodeURIComponent vs encodeURI — the classic bug

encodeURIComponent escapes everything that could confuse a query string (including & = ? /), while encodeURI preserves URL structure characters. Pick wrong and your redirect breaks: a callback URL passed as a ?redirect= parameter MUST use encodeURIComponent, or the inner '?' and '&' leak into the outer query.

Rule of thumb: encodeURIComponent for any value going INSIDE a URL; encodeURI only for whole-URL display encoding.

What percent-encoding actually does

URLs can only carry a limited ASCII set. Everything else — spaces, non-English characters, and characters with special meaning — gets percent-encoded: each byte becomes % followed by its hex value. ' ' → %20, 'ć' → %C4%87 (two UTF-8 bytes). Double-encoding is the classic bug: encode once, and %20 becomes %2520.

Frequently asked questions

How do I decode a URL-encoded string?
Select 'Decode' mode and paste — malformed input (a % not followed by two hex digits) will be flagged.
Why does %20 keep appearing as %2520?
That's double encoding — something encoded an already-encoded string. %2520 is literally the percent-escape of the text '%20'. Decode twice, or fix the source to encode once.
What's the difference between a URL and URI?
A URL is a URI that also tells you how to locate the resource (scheme + host). In daily work the terms are interchangeable; the standard that governs parsing is WHATWG URL.
Why does analyze fail on 'example.com'?
A URL needs a scheme — the parser can't guess it's a URL without 'https://'. Add the scheme, or use encode mode.

Related calculators