%3C is the URL-encoded less-than sign (<).

In a URL, %3C stands for the less-than sign (<). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character<
NameLess-than sign
UnicodeU+003C
UTF-8 bytes3C (1 byte)
Percent-encoded%3C
Lowercase form%3c — identical meaning
Double-encoded%253C
HTML form encoding%3C
RFC 3986 classNot allowed in URLs
HTML entity&lt;

What it means in a URL

Not allowed raw in a URL; always encoded as %3C. It is also the character most associated with cross-site scripting, so decoded URL values must be HTML-escaped before they are shown on a page.

RFC 3986 class: Not allowed in URLs. It is outside the characters RFC 3986 permits, so it must always be percent-encoded.

When to encode it

Where it appearsWhat to do
Path segmentEncode
Query valueEncode
FragmentEncode
Form bodyEncode

The mistake to watch for

Decoding %3Cscript%3E and inserting it into a page without HTML-escaping it.

What each language produces

Every function in this 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)%3Cencoded
JavaScript encodeURI(s)%3Cencoded
JavaScript URLSearchParams%3Cencoded
Python urllib.parse.quote(s)%3Cencoded
Python quote(s, safe="")%3Cencoded
Python urllib.parse.quote_plus(s)%3Cencoded
PHP rawurlencode($s)%3Cencoded
PHP urlencode($s)%3Cencoded
Java URLEncoder.encode(s, UTF_8)%3Cencoded
Go url.QueryEscape(s)%3Cencoded
Go url.PathEscape(s)%3Cencoded
Ruby URI.encode_www_form_component(s)%3Cencoded
Ruby ERB::Util.url_encode(s)%3Cencoded
C# / .NET Uri.EscapeDataString(s)%3Cencoded

Decoding it

decodeURIComponent('%3C') returns the less-than sign (<). Python: urllib.parse.unquote('%3C'); PHP: rawurldecode('%3C'). Paste any string into the URL decoder to decode it in your browser.

← %3B Semicolon  ·  Full URL encoding table  ·  %3D Equals sign →

Common questions.

%3C is the percent-encoded form of the less-than sign (<), whose byte value is 0x3C. Decoding the URL turns it back into the character.

Yes. Hex digits in percent-encoding are case-insensitive, so %3c and %3C 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 %3C, Python’s quote(s, safe="") gives %3C, PHP’s rawurlencode gives %3C.

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.