Query String to JSON Converter
Paste a query string, full URL, or load a local file to decode parameters into a structured JSON object. This tool handles repeated keys, percent-encoded values, and can repair common syntax errors in malformed JSON documents.
Decode Parameters and Structure Data
The primary workflow converts raw query strings into a usable JSON object. Paste your input directly into the panel or load a local file from your device. The converter parses the string, decoding percent-encoding (e.g., %20 becomes a space) and mapping parameters to key-value pairs.
If your query string contains repeated keys (for example, ?id=1&id=2), the converter automatically structures these as an array in the JSON output ({"id": [1, 2]}). This is critical for frameworks that expect array notation for multi-valued parameters, ensuring the output matches how most JavaScript environments parse URLSearchParams.
Repair Malformed JSON Documents
Beyond standard query string conversion, the tool includes a repair step for messy JSON inputs. If you are working with JSON that has been manually edited or generated by inconsistent tools, the converter can fix specific syntax issues:
- Trailing Commas: Removes commas that precede a closing brace or bracket.
- Comments: Strips out
//and/* */style comments that are invalid in strict JSON. - Quote Standardization: Converts single-quoted strings to double-quoted strings and quotes bare member names.
This repair process re-reads the document after cleaning. However, it cannot infer missing closing braces, undefined variables (like Python True or None), or logical structural errors. Those issues still require manual editing.
Edge Cases and Data Precision
Be aware of two specific limitations when using the output in your application stack:
- Plus Signs (
+): In standard form-encoded query strings, a+represents a space. In raw path segments or when manually constructing query strings, a+is a literal plus. Ensure you encode the component you actually control to avoid decoding errors. - Large Integer Precision: JavaScript uses IEEE-754 doubles for numbers. Any integer exceeding 2^53 (9,007,199,254,740,991) will lose precision when parsed by standard JSON parsers. While this converter preserves long literal numbers exactly as typed in its text output, if you parse this JSON in a Node.js or browser environment, the tail digits may be dropped. For IDs larger than 2^53, keep them as strings in your source document.
Privacy and Local Processing
All processing happens locally in your browser. The tool does not upload your query strings, URLs, or files to a conversion server. Because the input remains on your device, you can safely process sensitive data without transmission risk. However, do not paste secrets or personal data on shared or public devices.
Important: browser parsers cover common practical cases. Always review generated files before using them in production, especially for configuration, subtitles, images and security-sensitive data.