%3F in a URL
The percent-encoded question mark (?).
Short answer
%3F is the percent-encoded question mark (?). A ? starts the query string, so a question mark that is part of a path segment or a value is written %3F to keep it from being read as the start of the query.
- Character
- ?
- Percent-encoded
- %3F
- Byte value
- 0x3F = 63
- RFC 3986 class
- gen-delim
- UTF-8 bytes
- 1
Where you will see it
- URLs nested inside a parameter: next=https%3A%2F%2Fa.com%2Fp%3Fx%3D1.
- Search terms ending in a question mark: q=why%3F.
- Output of encodeURIComponent; encodeURI leaves ? alone.
What goes wrong
- Only the first ? in a URL starts the query. A literal ? is allowed later inside the query string, so encoding later ones is optional but harmless.
- A ? inside a path segment is not allowed unencoded: the parser would end the path there. Encode it as %3F.
Decoded examples
| Encoded | Decodes to | What it is | Open in the decoder |
|---|---|---|---|
| q=why%3F | q=why? | A search term that ends in a question mark. | Open in decoder |
| next=https%3A%2F%2Fa.com%2Fp%3Fx%3D1 | next=https://a.com/p?x=1 | A URL with its own query, nested in a parameter. | Open in decoder |
How each language encodes ?
Outputs below come from running each function, not from documentation. “Kept” means the function leaves the character as it is. Compare every character across every function.
| Language | Function | Output for ? |
|---|---|---|
| JavaScript | encodeURIComponent | %3F |
| JavaScript | encodeURI | kept |
| JavaScript | URLSearchParams | %3F |
| JavaScript | escape (deprecated) | %3F |
| Python | quote (default safe='/') | %3F |
| Python | quote (safe='') | %3F |
| Python | quote_plus | %3F |
| C# | Uri.EscapeDataString | %3F |
| C# | WebUtility.UrlEncode | %3F |
| C# | HttpUtility.UrlEncode | %3f |
Questions
Can a URL contain two question marks?
Yes. The first ? starts the query string and any later ? is just data inside it. Percent-encoding the later ones is optional.
When should I encode a question mark?
Whenever it is part of a value or a path segment and should not start the query: nested URLs, search terms and file names are the usual cases.
Decode or encode your own text
Paste anything containing %3F. It runs in your browser; nothing is uploaded.
Related characters
%26
ampersand
%26 is the percent-encoded ampersand (&).
%3D
equals sign
%3D is the percent-encoded equals sign (=).
%23
hash sign
%23 is the percent-encoded hash sign (#).
All percent-encoded characters · Full percent-encoding table · What is URL encoding?
Behaviour checked against RFC 3986, the WHATWG URL Standard and MDN. Updated November 4, 2026
Tools
URL Encoder
Percent-encode a value, a full URL or form data, with strict RFC 3986 and +/%20 options.
URL Parser
Split a URL into scheme, host, port, path, query and fragment, with checks for common problems.
Query String Parser
Edit query parameters as a table, rebuild the string, or export it as JSON.
Base64 Encode/Decode
Convert text to Base64 and back, including the URL-safe Base64URL alphabet.
HTML Encode/Decode
Escape text to HTML entities and decode entities back to text.
JWT Decoder
Read a JSON Web Token's header and payload and check its expiry.