31 chars · 1 line
49 chars · 3 lines
31 chars · 1 line
49 chars · 3 lines
Numeric query serialization
Safe finite JSON numbers are accepted by Build Query and converted to their ordinary decimal string representation before URLSearchParams serializes them. This tool is free to use. No account or payment is required.
Last updated
Finite numbers are supported. Integer values also need to stay within JavaScript's safe-integer range to avoid silently rounded identifiers.
After validation, String() supplies the textual query value used by URLSearchParams.
All three numbers become ordinary query text.
{"page":2,"ratio":1.5,"zero":0}page=2&ratio=1.5&zero=0Common questions
No. Query syntax carries text without JSON quotes.
Those are not valid JSON numeric literals, and the builder also requires finite numbers.
Unsafe integers are rejected to prevent precision loss.
Debugging a specific Query String issue? Browse Query String troubleshooting.