%3F is a question mark
%3F is a question mark.
| Character | "?" |
|---|---|
| Name | Question Mark |
| Encoded | %3F |
| Reserved | Yes — it has a special meaning in a URL |
Why it breaks things
A question mark marks where a URL's path ends and its query string begins. Everything before the first ? is the address of a page; everything after is read as a list of parameters. A literal question mark cannot sit inside a path segment on its own — left unencoded, everything after it becomes part of the query string instead of the path.
Only the first ? does this job. A question mark that comes later is just a character inside the query string, not a fresh divider. This is what makes redirect links tricky: a value like next=https://example.com/account?tab=billing carries a second ? belonging to the nested URL. Modern parsers, such as the WHATWG URL standard browsers use, correctly keep it as part of the next value. Code that simply splits a string on every ? does not, and can cut the value short.
The everyday version of the path problem is a filename that happens to include a question mark, like is-this-organic?.pdf. Left unencoded, the server reads the path as is-this-organic, with no extension at all, and treats .pdf as query string data. Writing it as is-this-organic%3F.pdf keeps the question mark inside the filename, where it belongs.
Real examples
Without encoding
https://example.com/products/is-this-organic?.html
With encoding
https://example.com/products/is-this-organic%3F.html
The raw ? ends the path early. The server receives a request for /products/is-this-organic with a query string of .html, not a page named is-this-organic?.html.
Without encoding
https://example.com/login?next=https://example.com/account?tab=billing
With encoding
https://example.com/login?next=https%3A%2F%2Fexample.com%2Faccount%3Ftab%3Dbilling
The nested ? here is read correctly as part of the next value by modern URL parsers, since only the first ? in the whole address is the real divider. It is still worth encoding — anything that parses the URL with a simple string split instead of a proper parser will cut next off at the second ?.
Decode something
Result
Breakdown
| Part | Value | Copy |
|---|
History
Nothing yet.
History stays in this browser. It is never sent to our server.
Common questions
- Do I need to encode a question mark inside a query string value?
- Not strictly. Once you are past the first ?, the URL specification allows a literal question mark, since everything from there on is already inside the query string. But some tools split a URL on every ? they find rather than just the first one, so encoding it as %3F removes that risk, especially in redirect links.
- Why did my link lose its file extension after a question mark?
- Because the question mark was in the path, not the query string. A URL like is-this-organic?.pdf is read as the page is-this-organic with a query string of .pdf — the extension never reaches the server as part of the filename. Encoding it as %3F keeps it in the path.
- Is %3F the same kind of divider as %23?
- No. %3F starts the query string, which the server does receive and parse. %23 starts the fragment, which the browser strips off before the request is even sent. A stray question mark can confuse a server; a stray hash means the server never sees that part of the URL at all.
- What happens if a URL has two real question marks by mistake?
- Only the first one is treated as the divider between path and query. The second is read as literal text inside the query string, so it usually ends up folded into the first parameter's value rather than starting a new one.