Empty Query Parameter Name – Why =value Creates an Empty Key

Local only

Inspect empty-name query parameters and distinguish them from parameters with empty values.

16 chars · 1 line

34 chars · 4 lines

2 parameters2 unique keys

Query parameter edge case

What does a query parameter with no name mean?

A query segment such as =value is still a name/value pair. The name is the empty string, so the parsed JSON contains an empty-string key. 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 the query into Parse to JSON.
  2. Look for segments beginning with =.
  3. Add the intended parameter name before the equals sign.

Empty name and empty value are different cases

=value has an empty parameter name and a non-empty value. name= has a non-empty name and an empty value.

URLSearchParams preserves both forms rather than silently discarding them.

Empty key next to a normal parameter

The first parameter becomes the empty-string property.

Query string

?=value&name=ada

Parsed JSON

{
  "": "value",
  "name": "ada"
}

Common questions

Frequently asked questions

Is an empty parameter name ignored?

No. URLSearchParams preserves it as an empty-string key.

Is this the same as name=?

No. name= has a name and an empty value; =value has an empty name.

Should APIs accept empty names?

That is application-specific. The parser shows the actual query data so you can decide whether to reject it upstream.

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