%7E is the URL-encoded tilde (~).

In a URL, %7E stands for the tilde (~). It never needs encoding — Here is when to encode it, what it does in each part of a URL, and what every major language outputs.

Quick facts

Character~
NameTilde
UnicodeU+007E
UTF-8 bytes7E (1 byte)
Percent-encoded%7E
Lowercase form%7e — identical meaning
Double-encoded%257E
HTML form encoding%7E
RFC 3986 classUnreserved

What it means in a URL

The tilde is unreserved under RFC 3986 and never needs encoding. But PHP’s urlencode, Java’s URLEncoder and Ruby’s form encoder still turn it into %7E, following older rules.

RFC 3986 class: Unreserved. It never needs encoding; the encoded form is valid but should be normalised back to the plain character.

When to encode it

Where it appearsWhat to do
Path segmentLeave as-is
Query valueLeave as-is
FragmentLeave as-is
Form bodyLeave as-is

The mistake to watch for

Signature mismatches between systems that disagree about ~ versus %7E — common in OAuth 1.0a.

What each language produces

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

Decoding it

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

← %7D Right curly brace  ·  Full URL encoding table  ·  %0A Line feed (newline, LF) →

Common questions.

%7E is the percent-encoded form of the tilde (~), whose byte value is 0x7E. Decoding the URL turns it back into the character.

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

No. Tilde is an unreserved character in RFC 3986, so it can appear anywhere in a URL as-is.

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.