URL parser, encoder & decoder

Paste a URL to break it into its parts: protocol, username and password, host (IDN hosts shown as both punycode and Unicode), port, path, each query parameter decoded — duplicate keys and empty values included, in order — and the #fragment. Copy any part, or copy the query as JSON. Switch to encode or decode mode to percent-encode text as encodeURIComponent, encodeURI or form-urlencoded (spaces as +). Nothing is uploaded — it all runs in this page.

    Frequently asked questions

    What is the difference between encodeURIComponent, encodeURI and form encoding?

    encodeURIComponent escapes everything except letters, digits and - _ . ! ~ * ' ( ), so use it for a single query value or path segment. encodeURI leaves URL structure characters like / ? # & = : alone, so use it for a whole URL. Form-urlencoded (HTML forms, application/x-www-form-urlencoded) turns spaces into + and also escapes ! ' ( ) ~.

    Why does + sometimes mean a space?

    In query strings and form bodies, + is the form-encoding for a space, so this parser decodes a+b in a query parameter as “a b”. In paths and fragments + is a literal plus. In decode mode, pick “form” to turn + into spaces or “component” to keep it.

    What does “Malformed percent-escape” mean?

    Every % must be followed by two hex digits (%20, %C3%A9). Text like %E0%A4%A ends in an incomplete escape, and %E0%A4 alone is an incomplete UTF-8 character. The tool shows the position of the first problem; write a literal % as %25.

    How are duplicate query parameters shown?

    Every key=value pair is listed in the order it appears, so ?tag=a&tag=b shows two rows. In the JSON view repeated keys become an array: {"tag": ["a", "b"]}. A key without = (like ?flag) has an empty value.

    What about a ? inside the #fragment?

    Everything after the first # is the fragment, even if it contains ? or &. So in /page#/app?x=1 the query is empty and the fragment is /app?x=1 — browsers never send it to the server.

    How are internationalized domain names shown?

    Browsers convert Unicode hosts to punycode (münchen.de becomes xn--mnchen-3ya.de). Both forms are shown, so you can spot look-alike domains.

    Is anything uploaded?

    No. The page has no analytics and makes no network requests with your input.