24 chars · 1 line
38 chars · 4 lines
24 chars · 1 line
38 chars · 4 lines
Encoded query parameter names
Percent encoding is not limited to values. URLSearchParams also decodes escapes in parameter names, so encoded spaces or plus signs can appear in the JSON keys. This tool is free to use. No account or payment is required.
Last updated
URLSearchParams decodes each parameter name and value after splitting the query into pairs.
That means %20 becomes a space and %2B becomes a literal plus sign in keys just as they do in values.
Both parameter names are decoded before becoming JSON keys.
?user%20name=Ada&x%2By=1{
"user name": "Ada",
"x+y": "1"
}Common questions
It can after percent decoding, although many APIs choose simpler key names.
A raw + follows form-style space decoding; use %2B for a literal plus sign.
Query parameter names remain ordinary strings; whether an application treats them case-sensitively depends on that application.
Debugging a specific Query String issue? Browse Query String troubleshooting.