ASCII code for bell
7
Bell — a control character, not printable
| Decimal | 7 |
| Hexadecimal | 0x07 |
| Octal | 0007 |
| Binary | 00000111 |
| HTML entity |  |
| String escape | \a |
What it is
Rang the physical bell on a teletype. Terminals still beep or flash on receiving it, which is why printf "\\a" makes a noise and why a stray byte in a binary file can make your terminal chirp.
The full entry
ASCII 7 in full — the code point page, with what sits either side of it and how the character is encoded elsewhere.
Frequently asked questions
What is the ASCII code for bell?
The ASCII code for bell is 7 in decimal, 0x07 in hexadecimal and 0007 in octal.
What is bell in binary?
00000111 — eight bits, though ASCII only defines seven, so the top bit is always zero.
How do I write bell in a string?
Most languages accept the escape \a. Writing the raw character instead works in some contexts and breaks in others, which is what the escape exists to avoid.
Other characters
- ASCII code for backspace — 8
- ASCII code for tab — 9
- ASCII code for newline — 10
- ASCII code for vertical tab — 11
- ASCII code for form feed — 12
- ASCII code for carriage return — 13
- ASCII code for shift out — 14
- ASCII code for shift in — 15
- ASCII code for data link escape — 16
- ASCII code for device control 1 (xon) — 17
- ASCII code for device control 2 — 18
- ASCII code for device control 3 (xoff) — 19
Every character by name · The ASCII table · Text to binary converter