%7E is a tilde

%7E is a tilde, and it never actually needed encoding in the first place.

Character"~"
NameTilde
Encoded%7E
ReservedNo

Why it breaks things

RFC 3986 puts the tilde in the unreserved set, alongside letters, digits, hyphen, full stop and underscore. Nothing in the URL syntax gives it a job, so a raw ~ is always valid exactly as typed. Verified: encodeURIComponent("~") in JavaScript returns ~ unchanged, because there is nothing to escape.

%7E still shows up anyway. An older specification, RFC 2396 from 1998, treated the tilde differently, and some tools built to that older rule still encode it from habit, long after RFC 3986 replaced it in 2005.

The everyday sighting is an old-style personal URL, something like https://example.com/~jsmith/, a convention shared web hosts used for one user's own directory. Written as ~jsmith or %7Ejsmith makes no difference to a decoder — both resolve to the same path, and the unencoded form is the one the current standard calls correct.

Real examples

Without encoding

https://example.com/~jsmith/resume.pdf

With encoding

https://example.com/%7Ejsmith/resume.pdf

Both reach the identical address. The tilde is unreserved under RFC 3986, so the raw form on the left is not broken — it is the canonical one. %7E is just an older habit that still works because any decoder converts it straight back to ~.

Without encoding

https://example.com/api/users/~me/profile

With encoding

https://example.com/api/users/%7Eme/profile

Some APIs use ~me as a shorthand for "the current logged-in user." Encoding it to %7Eme changes nothing about how the server reads it, since the two forms are equivalent — this is a style choice, not a fix for anything broken.

Decode something

History

    Nothing yet.

    History stays in this browser. It is never sent to our server.

    Common questions

    Do I need to percent-encode a tilde in a URL?
    No. RFC 3986 lists the tilde as unreserved, the same category as letters and digits, so a raw ~ is always valid in a URL exactly as typed.
    Why do I still see %7E in some links?
    An older specification, RFC 2396, treated the tilde differently from the current RFC 3986. Some systems built against that older rule still encode it by habit, even though it has not been necessary since 2005.
    Is %7E treated the same as a raw ~ by browsers and servers?
    Yes. Any URL decoder converts %7E straight back to ~, so the two forms are interchangeable. Which one you see depends only on which tool produced the link.
    Where does the ~username style of URL come from?
    It is an old convention from shared web hosting, where each user's personal directory was served at a path starting with a tilde and their username, like /~jsmith/. Some servers still support it today.