🌐 EN

🧩 Query String Builder

Add key/value rows and instantly get a correctly percent-encoded query string, built with URLSearchParams. Enter a base URL to see the full assembled URL, or switch to Parse and paste an existing query string or URL to break each parameter down into a table.

Result

            
GUIDE

Learn more

01

1. Why encode with URLSearchParams?

Query strings often contain non-ASCII characters, spaces, and special characters like `&`, `=`, and `#`. Concatenating these by hand easily leads to bugs β€” missing encoding, double-encoding, or delimiter collisions. URLSearchParams is a browser standard API that correctly percent-encodes each value per the application/x-www-form-urlencoded rules and safely joins them with `&`. This tool uses that exact logic to build its output.

02

2. How are duplicate keys handled?

Query strings like `category=IT&category=Dev`, where the same key repeats, are common for multi-select filters or array-style parameters. The Parse tab reads every entry in order via URLSearchParams.entries(), showing a separate table row for each value even when the key repeats β€” avoiding the common mistake of keeping only the first value and silently dropping the rest.

03

3. Round-tripping between Build and Parse

Paste a full URL into Parse and it correctly extracts only the part after `?` (and before any `#`) as the query string. Conversely, paste the result from Build back into Parse to verify the encoding is correct and every value round-trips back to its original form.

Frequently asked questions

Are non-ASCII values like emoji or accented characters encoded correctly?
Yes. URLSearchParams encodes all non-ASCII characters as standard UTF-8 percent-encoding. Any value you enter β€” accented characters, emoji, spaces β€” is encoded safely.
What happens with empty keys or values?
Rows with an empty key are excluded from the result. A row with a key but an empty value is still included, as `key=`.
What happens if I don't enter a base URL?
Without a base URL, only the query string itself is shown, e.g. `?key=value&...`. Enter a base URL to get the full assembled URL, e.g. `baseUrl?key=value&...`.
Is my data sent to a server?
No. Both building and parsing happen entirely in your browser's JavaScript and are never sent to a server.