Developer
URL and Query String Parser
Break a link or a bare query string into its pieces and read every parameter already decoded, including a key that shows up more than once in order.
Output actions
Ready to copy output once your result appears.
Components in one table, parameters in another
URL and Query String Parser reads the URL field and, on Parse, fills a Components table and a Query parameters table. A full URL shows the parts that are present. A string that starts with ? or that contains = and no :// is treated as a query, and the host rows stay blank. Load sample fills ?tag=one&tag=two&name=Alice+Smith and does not parse until you press Parse. Enter in the field also parses. Reset clears the field, the tables, and the copied summary. Copy output and Download output use that summary. The download file is url-parser.txt.
How to parse a URL or a query string
- 1Paste into URL, or press Load sample. The placeholder is a full URL with a path, a query, and a fragment. The sample is only a query.
- 2Press Parse, or press Enter in the field. Components lists Protocol, Origin, Host, Port, Path, Query string, Fragment (#), Username, and Password, and it omits any row that is empty. Query parameters lists every pair in order.
- 3Read the tables. Copy output copies the same facts as labeled lines, with two spaces before each ?key = value line. Reset drops the tables. There is no decode switch. Plus signs and percent-encoding are decoded in the value column.
What it is good for
- • Seeing tag twice, in that order, instead of one tag overwritten by the next.
- • Checking that Alice+Smith in the raw query is Alice Smith in the value column.
- • Separating a path, a fragment, and a non-default port on a full URL.
Example
Input
?tag=one&tag=two&name=Alice+Smith
Output
Query string: ?tag=one&tag=two&name=Alice+Smith ?tag = one ?tag = two ?name = Alice Smith
Press Load sample, then Parse. The value column decodes the plus to a space. The Query string row keeps the plus, because that row is the raw search. Host, Path, and Protocol are omitted for this input.
What the two tables show
Parse trims the field and builds a URL. For a full URL the component rows are the URL's protocol including the colon, origin, hostname, port, pathname, search, hash, username, and password. Empty ones are skipped, so a URL with no userinfo has no Username or Password row, and a URL that uses the default port has no Port row. https://example.com/a shows Protocol https:, Origin https://example.com, Host example.com, and Path /a. Add :8443 and a Port row appears. A hash is the Fragment (#) row, including the # character. It is not turned into a query parameter.
Query parameters walk the pairs in source order. Repeated keys stay repeated. The sample lists tag as one, tag as two, then name. The value is decoded: a plus sign is a space, %20 is a space, and %2B is a literal plus. The Query string row in Components is the raw search, still starting with ? and still containing the plus. An empty value is kept. ?a=&b lists a as an empty value and b as an empty value. The copied summary is one line per visible component, then the pairs as two spaces, ? , the key, space, =, space, and the decoded value. That summary is what Copy output copies. The tables are the same facts.
Parse, Load sample, and a query with no host
The field does not parse as you type. Press Parse or Enter. A failure says Could not parse URL. Check the input and try again. and clears the tables and the copied text. Load sample only fills the field. Reset clears the field and the tables. There is no menu for encoding and no checkbox that keeps plus signs as plus signs. A host with no scheme and no equals sign is given https://. example.com/a therefore parses as HTTPS, host example.com, path /a. Include a scheme when the URL is http or something else.
A string that starts with ? is query-only. So is any string that contains = and does not contain ://. The page parses those against a stand-in origin and then blanks protocol, host, path, and origin so the tables do not invent a host. The sample is why Host is missing. example.com?x=1 also counts as query-only, because it has = and no ://. The host is not shown. Write https://example.com?x=1 when the host matters. The page does not request the URL and does not follow a redirect. It only reads the string.
When a decoded parameter list is the check
Use this page when a link, a log line, or a campaign URL is already a string and you need the pieces. Repeated keys are the usual surprise in an API query. A tracking link you just built can be pasted back to confirm source, medium, and campaign survived. The UTM builder writes those parameters. This page reads them. Encoding a single value before you drop it into some other string is URL encode / decode. This page decodes. It does not offer an encode button.
A cURL command is not a URL. Paste the URL from it, or convert the command with cURL to Fetch. The request guide walks through that conversion. A fragment after # stays in Fragment (#) and is not sent as a query parameter by HTTP. If the value you care about is after the hash, read that row, not the parameter table.
Plus signs, a host that looks like a query, and secrets
Alice+Smith becomes Alice Smith because form decoding treats + as a space. An email alias with a literal plus has to be %2B in the query, and the value column then shows the plus. A value that contains an ampersand has to be %26, or the ampersand starts another parameter and the tables will show the split. The raw Query string row is the place to see what was actually pasted. The value column is the place to see what a server-side form decoder would read. They are supposed to differ when the query uses + or percent-encoding.
Username and Password rows appear when the URL has userinfo, and both are included in the copied summary. Treat that copy like any other secret in a log. A malformed string, or an empty field, produces the parse error and no tables. Whitespace around the paste is trimmed first. A query that is only ? produces a Query string row of ? and no parameter rows. The page will not invent a parameter you did not write, and it will not collapse two tags into one.
Rules and limitations
Parse on button or Enter. Full URLs expose the non-empty components. A leading ? , or a string that has = and no ://, is query-only and hides the host. A schemeless host with no equals sign is read as HTTPS. Plus signs and percent-encoding are decoded in parameter values. The raw search is unchanged.
Repeated keys stay in order. Empty values stay. The fragment is not a query parameter. Userinfo is shown and copied. The page does not request the URL. Copy and download are the summary lines.
Common problems
If a host vanished, the string contained = and no ://, so it was parsed as a query. Add https:// when the host should appear.
If a plus became a space, that is form decoding. Use %2B for a literal plus. If one value split into two keys, an unencoded & started a new pair.
Frequently asked questions
Are repeated keys kept?
Yes. tag=one&tag=two is two rows, in that order. The second tag does not replace the first.
Why did a plus sign become a space?
Query decoding treats + as a space. The raw Query string row still shows the plus. A literal plus in a value should be %2B.
Can I paste only the query?
Yes. A leading ? or a key=value string with no :// is accepted, and the host rows are left out.
Does Parse open the URL?
No. It only splits the string in the browser. Nothing is requested.
Is my input uploaded or saved?
This tool processes input in your browser and does not save its input or output to local storage. Copy and download are user actions. The site uses analytics for page and action metadata and may use ads and production error reporting; see the Privacy Policy for those services.
About this tool
Maintained by Toolbench. For large or deeply nested files, split the input into smaller batches and verify representative results before using them in an import or application. Report reproducible problems through Contact.
Guides
- Turn a browser request into Python or JavaScript
Capture one request as cURL, convert it to requests or fetch, and review credentials and browser restrictions.
Next steps
Related tools
Continue the workflow with nearby tools for formatting, publishing, debugging, or follow-up checks.
URL Encode / Decode
Percent-encode or decode text with encodeURIComponent.
Open URL Encode / DecodeUTM Builder
Build campaign-ready URLs with UTM parameters.
Open UTM BuildercURL to JavaScript Fetch
Convert cURL commands to JavaScript fetch code for browsers or Node.js. Preserve request headers and bodies with optional secret redaction.
Open cURL to JavaScript FetchcURL to Python Requests
Convert a cURL request to Python requests code with headers, body and basic authentication. Redact common secrets before sharing.
Open cURL to Python RequestsTrust
Policies, contact, and answers
Clear pages for how Toolbench works, what we collect, and how to reach us.