%3F is the URL-encoded question mark (?).

In a URL, %3F stands for the question mark (?). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character?
NameQuestion mark
UnicodeU+003F
UTF-8 bytes3F (1 byte)
Percent-encoded%3F
Lowercase form%3f — identical meaning
Double-encoded%253F
HTML form encoding%3F
RFC 3986 classReserved — general delimiter

What it means in a URL

The first raw ? starts the query string. A question mark inside a path segment or inside a parameter value must be encoded as %3F; after the query has started, further raw ? characters are allowed by RFC 3986 but are safer encoded.

RFC 3986 class: Reserved — general delimiter. It marks the structure of a URL (scheme, authority, path, query, fragment), so as data it must be encoded.

When to encode it

Where it appearsWhat to do
Path segmentEncode
Query valueAllowed raw (encoding is also fine)
FragmentAllowed raw
Form bodyEncode

The mistake to watch for

A file or page name containing ? (/faq/why?.html): the server sees the path end at why.

What each language produces

Left as-is by JavaScript encodeURI(s); every other function in the table encodes it. Output for the single character, UTF-8 input, tested against the real runtimes (see the encoding comparator for your own strings).

FunctionOutput
JavaScript encodeURIComponent(s)%3Fencoded
JavaScript encodeURI(s)?kept
JavaScript URLSearchParams%3Fencoded
Python urllib.parse.quote(s)%3Fencoded
Python quote(s, safe="")%3Fencoded
Python urllib.parse.quote_plus(s)%3Fencoded
PHP rawurlencode($s)%3Fencoded
PHP urlencode($s)%3Fencoded
Java URLEncoder.encode(s, UTF_8)%3Fencoded
Go url.QueryEscape(s)%3Fencoded
Go url.PathEscape(s)%3Fencoded
Ruby URI.encode_www_form_component(s)%3Fencoded
Ruby ERB::Util.url_encode(s)%3Fencoded
C# / .NET Uri.EscapeDataString(s)%3Fencoded

Decoding it

decodeURIComponent('%3F') returns the question mark (?). Python: urllib.parse.unquote('%3F'); PHP: rawurldecode('%3F'). Paste any string into the URL decoder to decode it in your browser.

← %3E Greater-than sign  ·  Full URL encoding table  ·  %40 At sign →

Common questions.

%3F is the percent-encoded form of the question mark (?), whose byte value is 0x3F. Decoding the URL turns it back into the character.

Yes. Hex digits in percent-encoding are case-insensitive, so %3f and %3F mean the same thing. RFC 3986 recommends uppercase, and mixing cases can make caches and analytics count one URL as two.

Use your language’s encoder on the value: encodeURIComponent in JavaScript gives %3F, Python’s quote(s, safe="") gives %3F, PHP’s rawurlencode gives %3F.

More from the toolkit.

About this page. Written and maintained by Sri Murugan Systems, the developer of urlencodedecode.com. Character classes follow RFC 3986 §2; language outputs were generated by running each function in its real runtime.