JSON to Query String Converter
Paste a flat JSON object and get a URL-safe query string with repeated array values. This tool handles the mechanical translation from your structured data to a standard query string format that browsers and servers can read easily.
How to use the tool
- Paste your JSON object into the input field.
- If your JSON contains minor formatting errors like trailing commas, comments, or a Byte-Order Mark, the built-in repair step will attempt to fix them before conversion. It also converts single-quoted strings to double quotes and quotes bare member names.
- For any uninferrable errors, such as a missing closing brace or a Python
Truevalue, you will need to manually edit the source code before converting. - Click the Convert button to generate the encoded query string.
Key Considerations
- Preserving Large Numbers: JavaScript treats numbers as 64-bit floating-point numbers (IEEE-754 doubles), which can lead to precision loss for integers greater than 2^53. However, this tool mitigates that risk by keeping long number literals exactly as you typed them, preventing digit loss during the conversion process.
- Handling Plus Signs: Remember that in form-encoded query values, a
+sign represents a space. If you are encoding a path or a raw value where+has a literal meaning, you need to encode that specific component separately. - Repeated Keys: The tool supports arrays by outputting repeated keys in the query string. When decoding, these repeated parameters are read back as arrays.
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.