Query String Parser — Extract & Edit URL Parameters Online
Parse · Build · Encode · Diff · Batch — 10 powerful URL tools in one, 100% browser-side
The query string is where URLs carry data — search terms, filters, tracking codes, API keys and pagination. This query string parser decodes the raw ?key=value&key2=value2 string into a clean, editable parameter table. View all parameters at once, decode percent-encoded values, spot duplicates, and add or remove parameters to rebuild the URL. Essential for API development, UTM tracking analysis and debugging search filters.
What is a URL Parser?
A URL (Uniform Resource Locator) parser breaks a web address into its individual components: protocol (scheme), username, password, hostname, port, pathname, query string (search params), and hash fragment. This tool uses the browser's native URL API for 100% accurate parsing — the same engine your browser uses — with zero server requests.
10 Features in This URL Parser
1. Live URL Breakdown — Colour-coded anatomy view showing every URL part. 2. Query Params Editor — Edit, add, delete params with live URL reconstruction. 3. URL Builder — Compose a URL from protocol, host, path, params, and hash. 4. Encode/Decode — encodeURIComponent and encodeURI with quick-load. 5. cURL Generator — One-click cURL command for any HTTP method. 6. URL Diff — Compare two URLs part-by-part, highlight differences. 7. Batch Parser — Parse up to 50 URLs at once, export as CSV. 8. URL Validator — Detect HTTPS issues, credentials, length warnings. 9. Smart Copy — Copy any individual URL part with one click. 10. History — Last 50 parsed URLs with one-click restore.
Frequently Asked Questions
How is a query string structured?
A query string starts with ? and contains key=value pairs separated by & (ampersand). Keys and values are percent-encoded — spaces become %20 or +, special characters become %XX hex sequences. Example: ?name=John%20Doe&city=New+York&age=30. Some parameters repeat with the same key: ?tag=js&tag=css creates an array of tags.
What is the difference between %20 and + in URLs?
Both encode a space, but in different contexts. %20 is the standard percent-encoding for space in any URL component. + encodes space only in application/x-www-form-urlencoded format (HTML form submissions). In query strings, both are commonly accepted. In path segments, only %20 is valid — + is a literal plus sign. decodeURIComponent handles %20; decodeURIComponent does NOT decode +. Use URLSearchParams to decode both correctly.
How do I access query string parameters in JavaScript?
Modern approach using URLSearchParams: const params = new URLSearchParams(window.location.search); const page = params.get("page"); // "1". For multiple values: params.getAll("tag"). To iterate all: for (const [key, val] of params). In Node.js: const url = new URL(req.url, "http://localhost"); url.searchParams.get("id"). Avoid manual string splitting — URLSearchParams handles encoding correctly.
Can query strings have duplicate keys?
Yes — the same key can appear multiple times: ?color=red&color=blue&color=green. How duplicates are handled depends on the server framework: PHP: $_GET["color"] returns "green" (last value). Node.js URLSearchParams: params.getAll("color") returns ["red","blue","green"]. Express.js: req.query.color returns ["red","blue","green"]. This is commonly used for multi-select filters and tag systems.