15 chars · 1 line
34 chars · 4 lines
15 chars · 1 line
34 chars · 4 lines
Flag-style query parameter
A key-only query segment is accepted by URLSearchParams. With no explicit equals sign or value, the exposed value is the empty string. This tool is free to use. No account or payment is required.
Last updated
The parser does not infer true merely because a key is present. A segment named debug without = produces an empty-string value.
If your API uses presence-only flags, handle that rule at the application layer rather than expecting generic query parsing to create a boolean.
debug exists but its parsed value is empty.
?debug&name=ada{
"debug": "",
"name": "ada"
}Common questions
Not to URLSearchParams. It means the key debug exists with an empty-string value.
No. Query parsing returns strings; application code decides how to interpret them.
For URLSearchParams value retrieval, both expose an empty string.
Debugging a specific Query String issue? Browse Query String troubleshooting.