%5C is a backslash

%5C is a backslash. It has no meaning in a URL at all.

Character"\"
NameBackslash
Encoded%5C
ReservedNo

Why it breaks things

A backslash carries no defined meaning anywhere in the URL specification. It is not a reserved delimiter and not in the unreserved set either, so it almost never appears in a URL on purpose — it shows up because it was copied from somewhere else, usually a Windows file path.

Browsers do something unexpected with it anyway: a bare backslash appearing where a forward slash is expected is silently treated as one. Verified directly: https://example.com\a\b\c parses with the path /a/b/c, no error and no warning.

That is why C:\Users\ben\file.txt pasted after a domain turns into a path instead of failing — the browser quietly reinterprets every backslash as a slash. The conversion only happens there. A backslash inside a query value is left alone, so it can still confuse anything downstream that treats it as an escape character, like JSON or a shell.

Real examples

Without encoding

https://example.com/files\reports\2026\august.pdf

With encoding

https://example.com/files/reports/2026/august.pdf

Browsers silently convert each backslash to a forward slash here and load the page anyway, hiding the mistake instead of catching it. A command-line tool or an HTTP client that builds the request without going through a real URL parser will not do the same conversion, and may send a broken request instead.

Without encoding

https://example.com/upload?path=C:\Users\ben\file.txt

With encoding

https://example.com/upload?path=C%3A%5CUsers%5Cben%5Cfile.txt

Inside a query value the backslash is not converted by the browser — it passes through exactly as typed. The risk is downstream: a backslash is an escape character in JSON and in most programming languages' string literals, so whatever reads this value next may misread the character right after each backslash unless it is percent-encoded first.

Decode something

History

    Nothing yet.

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

    Common questions

    Why did my Windows file path turn into a broken link?
    Browsers convert backslashes to forward slashes inside a URL's path, so C:\Users\ben\file.txt is read as a series of path segments, not a drive letter and folder structure. Nothing about the result points at a real file on a web server.
    Is %5C the same as %2F?
    No. %2F is a forward slash, which actually divides a URL's path into segments. %5C is a backslash, which has no meaning in a URL at all — browsers only convert it to a slash as a courtesy in one specific spot.
    Why does pasting a Windows path into a browser sometimes seem to work?
    Because of the silent backslash-to-slash conversion described above. The address bar accepts it and may even load a page, but that is an accident of browser leniency, not a sign the path was a valid URL.
    Do I need to encode a backslash inside a query string value?
    Yes, if you want it preserved reliably as literal data. The browser leaves a backslash in a query value untouched, but other tools further down the chain may treat it as an escape character unless it is percent-encoded.