The Anatomy of a URL
Every URL (Uniform Resource Locator) follows a well-defined structure specified by RFC 3986. Understanding each part is essential for web development, API integration, and debugging network issues. Here is a complete URL broken into its components:
https://user:pass@www.example.com:8080/api/v1/users?page=2&sort=name#results
|_____| |_______| |_______________|____| |____________| |________________| |______|
scheme userinfo host port path query string fragmentThe scheme (or protocol) tells the browser how to communicate — usually https or http. The host identifies the server, and the optional port overrides the default (443 for HTTPS, 80 for HTTP). The path specifies the resource on the server, while the query string passes key-value parameters. Finally, the fragment points to a specific section within the page.
URL Encoding and Decoding
URLs can only contain a limited set of ASCII characters. When you need to include special characters — spaces, ampersands, non-Latin characters — they must be percent-encoded. For example, a space becomes %20, and an ampersand becomes %26.
// Original
https://example.com/search?q=hello world&lang=en
// Encoded
https://example.com/search?q=hello%20world&lang=enDecoding reverses this process, turning percent-encoded strings back into readable text. This is particularly important when parsing URLs from logs, analytics tools, or encoded redirect chains where multiple layers of encoding can make the URL completely unreadable.
Query Parameters in Depth
Query parameters are the key-value pairs that appear after the ? in a URL. They are separated by & characters and follow the pattern key=value. Query parameters are used extensively in search engines, pagination, API filtering, and tracking:
https://api.example.com/products?category=electronics&min_price=100&max_price=500&sort=price_asc&page=1When debugging API calls, being able to quickly extract and inspect each parameter saves significant time. The PulpMiner URL parser automatically separates every query parameter into a clean table so you can see exactly what is being sent to the server.
How to Use the PulpMiner URL Parser
The URL Parser takes any URL and instantly breaks it into its constituent parts. Here is how to use it:
- Paste a URL into the input field. It can be encoded, partially encoded, or plain text.
- View the breakdown — the tool displays the protocol, host, port, path, query parameters, and fragment separately.
- Inspect query parameters in a structured table with decoded keys and values.
- Copy individual parts or the fully decoded URL for use in your code or documentation.
Common Use Cases
Debugging API Requests
When an API returns unexpected results, the first thing to check is the URL. A wrong query parameter value or a missing parameter can cause subtle bugs. Paste the full request URL into the parser to verify every parameter.
Decoding Tracking URLs
Marketing platforms often wrap URLs in multiple layers of encoding for tracking purposes. A single redirect URL can contain encoded URLs nested inside other encoded URLs. The parser decodes everything so you can see the final destination.
Building and Testing URLs Programmatically
When constructing URLs in code with URLSearchParams or string concatenation, it is easy to introduce encoding errors. Paste the generated URL into the parser to confirm it is well-formed before making the request.
URL Parsing in JavaScript
Modern JavaScript provides the built-in URL class for programmatic parsing:
const url = new URL("https://example.com/path?key=value#section");
console.log(url.hostname); // "example.com"
console.log(url.pathname); // "/path"
console.log(url.searchParams.get("key")); // "value"
console.log(url.hash); // "#section"However, when you just need to quickly inspect a URL from a log file or error message, a browser-based tool is far faster than writing code. Try the URL Parser to break down any URL instantly.
