Empty Query Parameter Value – Why name= Becomes an Empty String

Local only

Explain the difference between an empty query value and a missing parameter.

18 chars · 1 line

36 chars · 4 lines

2 parameters2 unique keys

Empty query value behavior

Why an empty query parameter becomes an empty string

The query name= contains a key and an explicitly empty value. That is different from omitting name entirely, so the parser preserves it as the JSON string "". 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. Parse the query and locate the key with the empty value.
  2. Confirm the original URL contains key= rather than omitting the key.
  3. Handle the empty string according to the receiving application's own schema.

Query strings do not carry JSON null semantics

URLSearchParams exposes parameter values as strings. An explicit empty value therefore becomes an empty string, not null or undefined.

Build Query follows the same practical mapping: JSON null is serialized as an empty parameter value because a query string has no native null data type.

Explicitly empty name parameter

The key is preserved and its value remains empty.

Query string

?name=&active=true

Parsed JSON

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

Common questions

Frequently asked questions

Is name= the same as no name parameter?

No. name= explicitly includes the key with an empty value.

Will it become null?

No. Parse mode returns query values as strings or arrays of strings.

What does Build Query do with JSON null?

It serializes null as an empty value for that parameter.

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