Back
Asciify Logo
Asciify
[]

Reverse Solidus

\ (Backslash) is ASCII code point 92 (0x5C), Unicode U+005C, and a printable punctuation character. It reverses the direction of the familiar forward slash — a mirror-image stroke that leans the "wrong" way, which turns out to be exactly why it became the universal escape character. In nearly every programming language and format, the backslash says "treat the next character differently." It introduces escape sequences: \n for newline, \t for tab, \\ for a literal backslash itself, and \" to embed a quote inside a string. Regular expressions pile on additional meaning — \d matches a digit, \b a word boundary — creating a layer of escaping on top of the language's own string escaping. This double duty is the source of the infamous "leaning toothpick syndrome," where a regex in a string literal requires \\\\ just to match a single literal backslash: one level of escaping for the string, another for the regex engine. Windows chose \ as its path separator (C:\Users\Documents), forever condemning developers who work across platforms to juggle / and \ in the same codebase and wonder why their path-joining logic only fails in CI. Bob Bemer added the backslash to ASCII in the early 1960s, specifically so that the two-character sequences \( and \) could represent the braces { and } on hardware that lacked them — a pragmatic invention with consequences he couldn't have foreseen. UTF-8 encodes it as a single byte 0x5C. Unicode classifies it as Po (Punctuation, Other) with the name REVERSE SOLIDUS. The visually similar set minus ∖ (U+2216) is a mathematical operator for set difference, and swapping one for the other will derail both a proof and a file path.

Symbol

Technical Details

Code Example

</>
const char *path = "C:\\Temp\\app.log";
// \\ in source becomes a single backslash at runtime
printf("%s\n", path);
// also enables escapes like \n and \t in strings

Frequently Asked Questions

  • C chose \ for escape sequences in the 1970s (\n, \t, \0), and virtually every language since copied the convention. It was picked because it's rarely needed in normal text and is visually distinct from /. Now it's universal: \n (newline), \t (tab), \\ (literal backslash), \" (quote in string).

  • DOS 2.0 (1983) needed a path separator but / was already used for command-line switches (dir /w). Microsoft chose \. Unix had used / since 1971. This split has caused 40+ years of cross-platform headaches. Most modern Windows APIs actually accept both, but many tools still break.

  • To match a literal backslash in regex, you need \\. But in a string literal, each \ is already an escape, so you write '\\\\' — four backslashes to match one. This exponential escaping is called 'leaning toothpick syndrome.' Python raw strings (r'\\') and regex literals (/\\/) reduce this pain.

  • JSON requires \\ for a literal backslash. Windows paths like C:\Users\file must be written as C:\\Users\\file in JSON. Forward slashes work in most contexts (C:/Users/file) and don't need escaping. This is why many tools normalize paths to forward slashes regardless of OS.

@workani&@alexluthor
Privacy & legal

Privacy

No accounts, no ads, no tracking cookies, and no cross-site tracking. The only analytics we keep are faceless — anonymous, aggregated counts of pages and searches, never tied to you. We store no IP addresses, set no tracking cookies, and build no profiles. Cloudflare hosts the site and handles requests for delivery and security.

Full privacy policy·Extension privacy·legal@asciify.dev

Attributions & licenses

Twemoji
© Twitter, Inc and other contributors · CC-BY 4.0
Noto Color Emoji
© Google · Apache 2.0
Fluent UI Emoji
© Microsoft · MIT
OpenMoji
© HfG Schwäbisch Gmünd · CC-BY-SA 4.0
Toss Face
© Viva Republica (Toss) · SIL OFL 1.1
JoyPixels
© JoyPixels Inc. · Free Limited Use License
SerenityOS Emoji
© The SerenityOS Developers · BSD-2-Clause
EmojiTwo
© EmojiTwo contributors · CC-BY 4.0
Apple Color Emoji
© Apple, Inc.
Facebook Emoji
© Meta Platforms, Inc.

Apple and Facebook emoji styles are proprietary and shown here solely for reference and comparison — a common-sense application of nominative-use / fair-use principles. asciify is not affiliated with, endorsed by, or sponsored by Apple, Inc., Meta Platforms, Inc., or any other rights holder listed above. If a rights holder requests removal of their emoji style from this site, it will be removed.

All other vendor emoji are reproduced for reference and comparison under their respective open licenses listed above.

Character names and code points from the Unicode® Standard. Unicode® and the Unicode Logo are registered trademarks of Unicode, Inc.

Privacy
© asciify.dev 2025-2026