JSON and GET Convert
Free online JSON and GET convert tool, no installation required
About JSON and GET Convert
This tool converts in both directions between a JSON object and an HTTP query string (the GET parameter format). JSON to GET serializes an object's keys and values into URL-encoded key=value pairs joined by ampersands, and GET to JSON parses a query string into a pretty-printed two-space-indented JSON object.
How to Use
1. Paste your input into the Input box. 2. For JSON to GET, provide a JSON object and click the JSON to GET button. 3. For GET to JSON, provide a query string (key=value pairs separated by &) and click the GET to JSON button. 4. Read the converted output in the Result panel and click Copy to copy it.
Conversion Rules
JSON to GET parses the input with JSON.parse, then iterates the object entries with URLSearchParams; null and undefined values are skipped, and every other value is stringified (so a boolean becomes the literal string 'true' and a nested object becomes '[object Object]'). GET to JSON uses URLSearchParams on the raw input, which means a leading '?' is optional and keys are URL-decoded; duplicate keys in the query string collapse so that the last value wins, and the output is JSON.stringify-ed with a 2-space indent. Invalid input prints an explicit 'Invalid JSON' or 'Invalid GET parameters' message rather than throwing.
▶What happens to nested objects or arrays in JSON to GET?
▶Does GET to JSON need a leading question mark?
▶How are duplicate keys handled in GET to JSON?
▶Is my data sent to a server?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee