JSON null in Query String – Why null Becomes an Empty Value

Local only

Explain the builder's intentional mapping from JSON null to an empty query parameter value.

27 chars · 1 line

43 chars · 3 lines

1 parameter1 unique keys

Query value serialization

Why JSON null becomes key= in a query string

Query strings have string values but no native null type. VetaTool maps a JSON null property to an explicit empty value such as name= rather than the text name=null. 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. Paste a JSON object containing null into Build Query.
  2. Confirm the generated pair ends with = and contains no literal null text.
  3. Decide whether the receiving API distinguishes empty, missing, and null values.

URLSearchParams stores text, not JSON null

The builder converts null to the empty string before appending the parameter.

This preserves the key while avoiding an invented literal null value. Application-specific null semantics still belong to the receiving API contract.

null becomes an explicit empty value

name is present but empty; active is stringified as true.

JSON object

{"name":null,"active":true}

Built query string

name=&active=true

Common questions

Frequently asked questions

Does null become the text null?

No. The builder emits an empty value.

Is name= the same as omitting name?

No. The key is still present in the query string.

Will parsing name= return null?

No. Parse mode exposes the value as an empty string.

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