Skip to content

URL Parser

Break down URLs into protocol, host, port, path, query parameters, and hash components.

URL Parser tool

Loading...

Example

Input: https://example.com:8080/docs/page?q=test&lang=en#intro

Result: Protocol https:, Hostname example.com, Port 8080, Pathname /docs/page, Hash #intro, Query Parameters q = test, lang = en

The URL is split with the browser URL parser and each query parameter is percent-decoded once.

How Query Values Are Decoded

In the query stringDecoded value
q=hello%20worldhello world
q=a+ba b
q=a%2Bba+b
q=x%3Dyx=y
q=Tom%26JerryTom&Jerry
q=caf%C3%A9café
q=(empty string)

As shown in the Query Parameters table, which uses the browser URLSearchParams rules.

  1. Paste the full URL you want to analyze into the input field at the top.
  2. The parser instantly breaks the URL down into its individual components: protocol, hostname, port, path, query string, and hash (include the protocol, such as https://, or the URL is rejected).
  3. Review the query parameters table showing each key-value pair with decoded values.
  4. Check the host, origin, and port rows (a default port shows as "(default)") to confirm the request target.
  5. Use the parsed breakdown to debug routing issues, verify API endpoints, or understand encoded parameters.

The Parts of a URL Explained

A URL parser splits a web address into its parts: protocol, hostname, port, path, query string and hash. Paste https://example.com:8080/docs?q=test#intro and each part appears on its own row, with every query parameter listed as a key and a value.

Each part has a job. The protocol (https:) says how to connect. The host is the server name with an optional port; when the port is the default for the protocol, such as 443 for https, it shows as (default). The path picks a page or file. The query string after ? carries key=value pairs joined by &. The hash after # points to a spot in the page and is never sent to the server. The origin, made of protocol, host and port, is what browsers use for security rules such as CORS.

The tool uses the browser's built-in URL parser, which follows the WHATWG URL Standard. So you see the URL the way a browser sees it. The hostname is lowercased, dot segments such as /./a/../b are resolved to /b, and a username and password before the @ are shown if present. The URL must include a scheme such as https://, so example.com on its own is rejected.

In the Query Parameters table, values are decoded once: %20 and + both become a space, %2B becomes a plus and %26 becomes &. The Query String row keeps the raw encoded text so you can compare the two. Repeated keys, such as tag=1&tag=2, are listed separately. To encode or decode a single value, use URL Encode and Decode.

Sources

Frequently Asked Questions

Query strings are decoded with the rules HTML forms use, where + stands for a space. So q=a+b gives the value a b. If you need a real plus sign in a value, it must be sent as %2B. This is a common bug with phone numbers and Base64 values passed in URLs.
Most often the scheme is missing. The parser needs an absolute URL, so write https://example.com rather than example.com or www.example.com. A space or other illegal character in the host name also makes the URL invalid.
No. Everything after # stays in the browser. It is used to jump to a section of the page or by single-page apps for routing. That is also why some sign-in flows put tokens after the #: they reach the page's JavaScript but not the server logs.
The hostname is the server name alone, such as example.com. The host adds the port when one is given, such as example.com:8080. When the port is the default for the scheme, both show the same value. The origin goes one step further and adds the protocol, as in https://example.com:8080.

Related Tools

URL Encode and Decode

Encode special characters for URLs or decode percent-encoded strings back to readable text.

Developer Tools

Base64 Encode and Decode

Encode text to Base64 and decode Base64 strings back to readable text, with full UTF-8 support.

Developer Tools

JSON Formatter and Validator

Format, validate, beautify, and minify JSON data with a collapsible tree view and line-and-column error detection.

Developer Tools

Regex Tester

Test regular expressions with real-time match highlighting, group capture display, and a pattern library.

Developer Tools

HTML Entity Encode and Decode

Convert special characters to HTML entities and decode HTML entities back to readable text.

Developer Tools

JWT Decoder

Decode JSON Web Tokens to inspect header, payload, and signature without needing the secret key.

Developer Tools