application/x-www-form-urlencoded pairs
Parse and build a query string
A query string is a list of pairs, not one encoded blob. This page splits q=red&size=42 into rows you can edit, then joins them back.
A leading ? is ignored. Parsing uses URLSearchParams, so + is a space and %20 is also a space. Repeated keys become repeated rows, in order. Building skips a row with an empty key and encodes with the form rules, which means spaces go back out as +. The URL encode page is for one value. This page is for the whole list. Hash fragments after # are not part of the query. Paste only the query.
The pairs are parsed in this tab. The page does not request the URL.
This tool runs in your browser. Turn on JavaScript to use it.
Two pairs, one of them with a space
The plus sign is a space in this encoding. The row shows the space, and building puts the plus back.
- Query
- q=red+shoe&size=42
- First row
- q = red shoe
- Second row
- size = 42
How to use it
- 1Paste a query, with or without the leading question mark.
- 2Edit the rows, add one, or remove one.
- 3Build the string and copy it onto the URL you already have.
Good to know
- Order follows the input. Building keeps the row order you see.
- A value may be empty, as in flag= or a bare flag. A bare flag is a key with an empty value.
- This will not encode a path or a host.
Questions
What happens to duplicate keys?
Each occurrence is its own row. They are not merged into an array.
Why did a plus become a space?
That is the form-urlencoded rule. Use the URL encode page if you need a literal plus inside one component first.
Can I paste a full URL?
Paste the part after ?. A full URL's path would be treated as a messy key.
Related tools
- Split a URL into parts
A URL is several fields joined by punctuation. This page uses the browser's URL parser and lists each part, including every query parameter.
- URL encode and decode
Reserved characters in a URL have jobs. A space, an ampersand, or an equals sign inside a value must be escaped or the query will split in the wrong place.
- Format and check JSON
JSON is a data format with strict commas, quotes, and no comments. This page parses what you paste and prints it again with an indent, or on one line.