|

ASCII Code 124

Vertical bar

About This Character

ASCII code 124 (0x7C) represents the Vertical bar character "|". The "Vertical bar" character (|) with ASCII code 124 is a punctuation or special symbol in the printable ASCII range. Punctuation characters serve important roles in both natural language writing and programming syntax. The printable ASCII characters (codes 32–126) include the space, digits, uppercase and lowercase Latin letters, and common punctuation symbols. These 95 characters form the foundation of text representation in virtually all computing systems and are universally supported across all character encodings, programming languages, and operating systems.

Character Encoding

Decimal 124
Octal 174
Hexadecimal 0x7C
Binary 01111100
HTML Code |
HTML Entity |
Unicode U+007C
Unicode Name VERTICAL LINE
URL Escape %7C
Quoted-Printable |
UTF-8 (Hex) 7C
Category Printable — Punctuation & Symbols

How to Type in Code

JavaScript
// Character literal
let char = '|';
// Using char code
let char2 = String.fromCharCode(124);
// Unicode escape
let char3 = '\x7C';
Python
# Character literal
char = '|'
# Using chr()
char = chr(124)
# Using ord() to get code
code = ord('|')  # Returns 124
HTML
<!-- Direct character -->
|
<!-- HTML entity (numeric) -->
&#124;
<!-- Hex entity -->
&#x7C;
C#
// Character literal
char c = '|';
// Using cast
char c2 = (char)124;
// To get code from char
int code = (int)'|';  // Returns 124

See Also

Copied!