$ toolfu run query-params-to-json
Query Params to JSON — Convert URL Parameters Online
Convert URL query parameters to JSON online for free. Paste a URL or query string and get clean formatted JSON output. Handles duplicates and encoding.
all processing runs in your browser
query-params-to-json
input > URL or query string
json output
{
"q": "hello world",
"page": "1",
"lang": "en",
"sort": "relevance"
}
4 parameters found
Convert Query Strings to JSON
When debugging APIs or analyzing URLs, you often need to extract and inspect query parameters. Manually parsing ?key=value&foo=bar strings is tedious and error-prone, especially with URL encoding.
This tool parses any URL or query string and outputs clean, formatted JSON. It handles URL-encoded characters, duplicate keys (converting them to arrays), and strips hash fragments automatically.
Common use cases
- Debugging API requests by inspecting query parameters
- Converting analytics tracking URLs to readable JSON
- Extracting parameters from OAuth callback URLs
- Parsing search engine result page URLs
$ cat FAQ.md
What formats does this accept?▶
You can paste a full URL (e.g., https://example.com/path?key=value), just the query string (key=value&foo=bar), or a query string with a leading question mark (?key=value). Hash fragments are automatically stripped.
How are duplicate keys handled?▶
If the same key appears multiple times (e.g., ?tag=a&tag=b), the values are combined into a JSON array: { "tag": ["a", "b"] }.
Are special characters decoded?▶
Yes. URL-encoded characters like %20 (space) and + (space) are automatically decoded using the standard URLSearchParams API built into your browser.