URL Parser

Paste any link and this URL parser splits it into protocol, credentials, host, port, path segments, query parameters and fragment. Edit the parameters, rebuild the URL and copy everything as JSON.

Full URLs, links without a scheme (example.com/page) and other schemes such as mailto: or wss: all work. The URL is parsed in your browser as you type.

Examples
Protocol
Username
Password
Host
Hostname
Port
Origin
Path
Decoded path
Query string
Fragment
Decoded fragment

Path segments

    This URL has no path segments.

    Query parameters
    KeyValue (decoded)Remove

    This URL has no query string. Click Add parameter to create one.

    Repeated keys are kept in order. Edit a key or value to rebuild the URL below.

    Rebuilt URL
    JSON
    
                            

    KeyValuedefaultRemove

    Understand Every Part of a URL

    Long links from analytics campaigns, OAuth redirects, API calls and signed download URLs are hard to read: dozens of percent-encoded parameters, a port that may or may not be there and a fragment at the end. Paste the link and the parser lays out every part in a table, with the decoded values next to the raw ones.

    Query parameters become an editable list, so you can change a value, remove tracking parameters or add a new key and copy the rebuilt URL. Parsing uses the same WHATWG URL standard as your browser and happens entirely on your device.

    A URL split into its host, path and query partshttps://…?q=1host / pathURLParser

    How to parse a URL

    1. Paste the URL into the input box. A missing scheme is fine: example.com/page is read as https://example.com/page and a notice says so.
    2. Read the components in the table: protocol, username and password, host, hostname, port, origin, path, query string and fragment. Empty parts show a dash, and each value has its own Copy button.
    3. Check the query parameters. Each parameter is one row with its decoded key and value, in the original order. Repeated keys such as color=blue&color=navy stay as separate rows.
    4. Edit and rebuild. Change a value, remove a row or add a parameter, then copy the rebuilt URL or click Use as input. The JSON panel always matches the current parameters.

    The parts of a URL

    A URL follows the pattern scheme://user:password@host:port/path?query#fragment. Only the scheme and, for web addresses, the host are required. The table below uses https://ada:[email protected]:8443/en/shoes?size=42#reviews as the example.

    ComponentExample valueWhat it means
    Protocol (scheme)https:How to reach the resource. Browsers lowercase it.
    Username, passwordada, s3cretOptional credentials before @. Browsers hide or block them for security.
    Hostnameshop.example.comDomain name or IP address. IPv6 addresses are written in brackets: [2001:db8::1].
    Port8443Left out when it is the default for the scheme, then reported as the implied port.
    Hostshop.example.com:8443Hostname plus port, as sent in the HTTP Host header.
    Originhttps://shop.example.com:8443Scheme, host and port: the unit browsers use for CORS, cookies and storage.
    Path/en/shoesLocation of the resource on the server, split into segments at each /.
    Query string?size=42Key-value pairs separated by &.
    Fragment (hash)#reviewsA position inside the page. Browsers never send it to the server.

    Default ports are 80 for http and ws, 443 for https and wss, and 21 for ftp. If you type https://example.com:443/, the standard parser drops the port because it is the default, so the port field is empty and the parser shows 443 (default).

    Query strings, encoding and repeated keys

    Characters that have a meaning in URLs, such as &, =, ?, # and spaces, must be percent-encoded inside a value: a space becomes %20, & becomes %26 and é becomes %C3%A9 (its UTF-8 bytes). The parser decodes these for display and encodes them again when it rebuilds the URL.

    • Plus signs: HTML forms send spaces as + (the application/x-www-form-urlencoded format), and URLSearchParams decodes them that way. Some APIs treat + as a literal plus, for example in phone numbers or Base64. Turn off Decode + as a space to see the literal value. In the path, + is always a plus.
    • Repeated keys like tag=a&tag=b are valid. Servers handle them differently: PHP keeps the last one unless the key ends in [], while many Node.js and Python frameworks return a list. The JSON output turns them into an array.
    • Keys without a value, such as ?active, are kept without an equals sign when the URL is rebuilt.
    • encodeURI vs encodeURIComponent: Encode URL normalises the whole link the way a browser does and keeps its structure. To encode a single value you insert into a URL, use encodeURIComponent, which also escapes /, ? and &.

    Tips for working with URLs

    • Strip tracking parameters such as utm_source, gclid and fbclid before you share a link or use it as a canonical URL.
    • Never put secrets in URLs. Query strings end up in server logs, browser history and Referer headers. Send tokens in a header or a cookie instead; the cookie parser shows what a cookie actually contains.
    • The fragment stays in the browser. If a single-page app or an OAuth flow puts data after #, the server never sees it.
    • International domains are converted to Punycode: bücher.example becomes xn--bcher-kva.example. Lookalike Unicode domains are a common phishing trick, so check the converted host.
    • Trailing slashes matter. /docs and /docs/ are different paths, and relative links resolve differently from them.
    • Debugging requests? Load a recording into the HAR viewer to see every request URL, match parameter patterns with the regex tester, and identify the client in a log line with the user agent parser.

    Frequently Asked Questions

    Common questions about parsing URLs and query strings.

    It splits a URL into its parts: scheme, credentials, host name, port, path, query string and fragment. It also decodes percent-encoded characters and lists every query parameter as a key and value.

    The port is only stored when it differs from the default for the scheme. For https the default is 443, so the parser leaves the port empty and shows 443 (default) instead.

    Every occurrence is kept as a separate row, in order. In the JSON output a repeated key becomes an array, for example "color": ["blue", "navy"].

    In form-encoded query strings, yes: HTML forms and URLSearchParams treat + as a space. Some APIs expect a literal plus sign, so you can switch the option off. A real space is always safe as %20.

    No. Browsers keep everything after # on the client. It is used for scrolling to an anchor and by single-page apps, and it never appears in server logs.

    Yes. Input such as example.com/page or localhost:3000 is read as an https URL, and a note tells you the scheme was added.

    The parser follows the WHATWG URL standard, like browsers: host names are lowercased, and Unicode domains are converted to Punycode, which starts with xn--.

    No. The URL is parsed with JavaScript in your browser, so tokens or private links you paste stay on your device.