%5E is the URL-encoded caret (^).

In a URL, %5E stands for the caret (^). Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character^
NameCaret
UnicodeU+005E
UTF-8 bytes5E (1 byte)
Percent-encoded%5E
Lowercase form%5e — identical meaning
Double-encoded%255E
HTML form encoding%5E
RFC 3986 classNot allowed in URLs

What it means in a URL

Not allowed raw; encoded as %5E. Every encoder in the comparison table encodes it. It turns up in search queries, version ranges (^1.2.0) and maths expressions.

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

Version strings such as ^1.2.0 in npm-style query parameters, which some servers reject unless encoded.

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

Decoding it

decodeURIComponent('%5E') returns the caret (^). Python: urllib.parse.unquote('%5E'); PHP: rawurldecode('%5E'). Paste any string into the URL decoder to decode it in your browser.

← %5D Right square bracket  ·  Full URL encoding table  ·  %5F Underscore →

Common questions.

%5E is the percent-encoded form of the caret (^), whose byte value is 0x5E. Decoding the URL turns it back into the character.

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

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.