19 chars · 1 line
27 chars · 3 lines
19 chars · 1 line
27 chars · 3 lines
Query string percent encoding
A raw ampersand separates query parameters. Percent-encode it as %26 when the ampersand belongs to the value itself. This tool is free to use. No account or payment is required.
Last updated
In application/x-www-form-urlencoded query data, & separates one name/value pair from the next.
URLSearchParams decodes %26 back to & after parameter boundaries have already been identified, so the character stays inside the value.
%26 survives parameter splitting and decodes back to &.
?value=fish%26chips{
"value": "fish&chips"
}Common questions
Because & is the separator between query parameters.
It decodes to a literal ampersand character.
Usually encode the individual component or embedded value, not the entire already-structured URL.
Debugging a specific Query String issue? Browse Query String troubleshooting.