Number Query Parameters – Build Integers and Decimals from JSON

Local only

Show how finite safe JSON numbers are stringified into query parameter values.

31 chars · 1 line

49 chars · 3 lines

1 parameter1 unique keys

Numeric query serialization

How JSON numbers become query parameter values

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

What you can do here

  • Browser-native URLSearchParams behavior
  • Full URL and raw query parsing
  • Repeated parameter preservation
  • JSON object to query construction
  • Browser-local processing

Steps

  1. Enter safe finite numbers in a JSON object.
  2. Build the query and inspect the decimal text.
  3. Use string values instead when an identifier must preserve formatting such as leading zeros.

The builder validates number safety before stringifying

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.

Integer, decimal, and zero

All three numbers become ordinary query text.

JSON object

{"page":2,"ratio":1.5,"zero":0}

Built query string

page=2&ratio=1.5&zero=0

Common questions

Frequently asked questions

Are numbers quoted in the query string?

No. Query syntax carries text without JSON quotes.

Can I build NaN or Infinity?

Those are not valid JSON numeric literals, and the builder also requires finite numbers.

What about very large integers?

Unsafe integers are rejected to prevent precision loss.

Debugging a specific Query String issue? Browse Query String troubleshooting.