%22 is a double quote
%22 is a double quote, also called a quotation mark.
| Character | """ |
|---|---|
| Name | Double Quote |
| Encoded | %22 |
| Reserved | No |
Why it breaks things
A double quote has no defined role anywhere in the URL specification. It is not a delimiter with a job, and it is not in the small set of characters allowed to appear literally either. A raw double quote is never valid — it always has to be percent-encoded.
Browsers enforce this before a request is even sent. Type or paste a literal " into the address bar and the browser encodes it to %22 on its own, so most people never see the raw character travel anywhere — it shows up already encoded, in a URL a program built, not one a person typed.
The everyday source is JSON dropped straight into a query string. A page that stores its filter state as JSON and puts it directly in the URL, like ?filters={"category":"shoes"}, has a quote around every key and value. Each one has to become %22, or the string stops being valid JSON the moment anything reads it back.
Real examples
Without encoding
https://example.com/search?filters={"category":"shoes","size":"10"}
With encoding
https://example.com/search?filters=%7B%22category%22%3A%22shoes%22%2C%22size%22%3A%2210%22%7D
Every quote around a JSON key or value needs its own %22, not just the braces and colons. Left raw, a hand-written query parser that expects one plain string instead reads the braces and quotes as part of a broken value.
Without encoding
https://example.com/profile?nickname=John "The Rock" Smith
With encoding
https://example.com/profile?nickname=John%20%22The%20Rock%22%20Smith
A real nickname with quotes in it. If a page takes this value and writes it straight into a double-quoted HTML attribute without escaping, like value="...", the quote inside the nickname closes the attribute early and breaks the markup.
Decode something
Result
Breakdown
| Part | Value | Copy |
|---|
History
Nothing yet.
History stays in this browser. It is never sent to our server.
Common questions
- Can a raw double quote ever appear in a URL?
- No. RFC 3986 excludes it outright, and browsers percent-encode it automatically before a request is sent. A URL with a literal, unencoded double quote in it is not valid.
- Why does my JSON break when I put it in a query string?
- Every quote around a JSON key or value has to become %22, or the string is no longer valid JSON once it is read back, and no longer a valid URL either. It is usually simpler to JSON.stringify the value first and then percent-encode the whole result.
- Is %22 the same kind of problem as %27?
- No. A double quote is banned everywhere in a URL, and browsers encode it automatically. An apostrophe is a legal sub-delimiter that most tools leave alone, so %27 shows up far less often in ordinary use.
- Why did my browser change the quotes in a URL I copied from an error message?
- Whatever produced the message likely included a raw double quote in the URL text. The moment it is pasted into the address bar, the browser encodes it to %22 before the request goes anywhere.