%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 | ~ |
|---|---|
| Name | Tilde |
| Unicode | U+007E |
| UTF-8 bytes | 7E (1 byte) |
| Percent-encoded | %7E |
| Lowercase form | %7e — identical meaning |
| Double-encoded | %257E |
| HTML form encoding | %7E |
| RFC 3986 class | Unreserved |
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 appears | What to do |
|---|---|
| Path segment | Leave as-is |
| Query value | Leave as-is |
| Fragment | Leave as-is |
| Form body | Leave 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).
| Function | Output | |
|---|---|---|
| JavaScript encodeURIComponent(s) | ~ | kept |
| JavaScript encodeURI(s) | ~ | kept |
| JavaScript URLSearchParams | %7E | encoded |
| 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) | %7E | encoded |
| Java URLEncoder.encode(s, UTF_8) | %7E | encoded |
| Go url.QueryEscape(s) | ~ | kept |
| Go url.PathEscape(s) | ~ | kept |
| Ruby URI.encode_www_form_component(s) | %7E | encoded |
| 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.