A URL looks like one continuous string, but it's actually a tightly structured format where every section has a specific, well-defined job — and once you can read the structure, a long, messy-looking link stops being intimidating.
Path vs. Query String
The path is the part right after the domain, structured like a folder hierarchy (/blog/url-parser-guide), and it usually identifies which specific resource or page is being requested. The query string comes after a ? and holds key-value pairs separated by &, used to modify or filter that resource — a search term, a page number, a sort order — without changing which underlying page is actually being loaded. The same path can be requested with countless different query strings, each producing a different view of the same resource.
What the Fragment Actually Does
Everything after a # is the fragment, and it works differently from the rest of the URL: it's never transmitted to the server as part of the request at all. Instead, the browser loads the full page normally and then uses the fragment locally to scroll to a matching element on the page — most commonly a heading with a matching ID, which is exactly how a table-of-contents link jumps straight to a section.
Why URLs Sometimes Have %20 in Them
URLs are restricted to a specific, limited set of safe characters. Anything outside that set — a space, an ampersand inside a value, accented or non-Latin characters — has to be percent-encoded: replaced with a % followed by the character's hexadecimal byte code. A space becomes %20, for instance. This guarantees the URL survives being copied, pasted, and transmitted correctly no matter what the original text contained, since every character in the encoded result is guaranteed to be URL-safe.
Break Down a URL Instantly
Paste any URL into the free URL Parser to see its protocol, host, path, query parameters, and fragment broken out individually.
FAQ
What's the difference between the path and the query string? The path (everything after the host, before a "?") typically identifies a specific resource or page, structured like a folder hierarchy. The query string (everything after the "?") holds key-value parameters that modify or filter that resource — like a search term, a page number, or a sort order — without changing which underlying resource is being requested.
What does the fragment (the part after #) actually do? The fragment identifies a specific location within the page itself, most commonly used to jump to a particular heading or section. Unlike the rest of the URL, the fragment is never sent to the server as part of the request — it's handled entirely by the browser after the full page has already loaded.
Why do some URLs have %20 or other percent signs in them? URLs can only safely contain a limited set of characters, so anything else — a space, an ampersand, a non-English character — has to be percent-encoded: converted into a % followed by its hexadecimal code. A space becomes %20, for example. This ensures the URL is transmitted correctly regardless of what characters the original text contained.