Vertical Bar (|) vs. Slash
The vertical bar “|” and slash “/” are separate Unicode characters. Their technical meanings depend on the syntax in use, while editorial slash usage follows a different set of writing conventions.
Use “|” only where the notation, command, table, or syntax defines a vertical bar; use “/” where a slash is required. They are not interchangeable punctuation marks.
Key details
Important caveats
Style Boundary
Do not infer that a vertical bar can replace a slash simply because both are separator-like marks.
Further guidance
Character Difference
Unicode distinguishes VERTICAL LINE (U+007C) from SOLIDUS/slash (U+002F).
Practical Application
Choose the character required by the notation or sentence: use the vertical bar “|” where a command, table, syntax, or specification defines it, and the slash “/” where slash punctuation or syntax is intended. Do not substitute one because they look similar.
Reader Check
Would replacing the character change the command, path, expression, table syntax, or editorial meaning? If yes, preserve the exact documented character.
Use
In technical material, preserve the exact character required by the syntax; in prose, follow the publication’s slash conventions.
Worked Example
Example: `A | B` and `A / B` are different expressions in many technical contexts; in ordinary prose, “and/or” uses a slash, not a vertical bar.
Sources and evidence
Sources are shown with the role they play in this guide. Historical or style-sensitive claims are kept within the evidence boundary described above.
- Basic Latin — Unicode Names List (opens in a new tab)Unicode Consortium · Unicode character identities for quotation mark, apostrophe, ampersand, solidus, and vertical line
- Slashes — Microsoft Writing Style Guide (opens in a new tab)Microsoft Learn · Writing and technical-use distinctions for slash and backslash