ASCII 4
ASCII 4 is End of Transmission — the control character EOT.
Every representation
| Character | EOT (not printable) |
| Name | End of Transmission |
| Decimal | 4 |
| Hexadecimal | 0x04 |
| Octal | 0004 |
| Binary | 00000100 |
| HTML entity |  |
| Escape sequence | \x04 |
| Unicode | U+0004 |
| Keyboard | Ctrl+D |
| Group | Control character |
What it is for
Ended a transmission entirely. On a Unix terminal this is what Ctrl+D sends, which is why Ctrl+D at an empty prompt closes the shell: it signals end-of-file on the input.
Where the number comes from
Codes 0 to 31 were reserved for control: instructions to a teleprinter rather than characters to print. Code 4 is Ctrl+D because the Ctrl key was originally wired to clear the top two bits of whatever you typed, mapping the letter D at 68 down to 4.
Frequently asked questions
What is ASCII 4?
End of Transmission (EOT), a control character. In hexadecimal it is 0x04, in octal 0004, and in binary 00000100.
How do I type ASCII 4?
Press Ctrl+D in a terminal. In a string literal you can write it as \\x04 in most languages.
Is ASCII 4 printable?
No. Codes 0 to 31 and 127 are control characters — they were instructions to a teleprinter rather than marks on paper, and most terminals show nothing for them.
Nearby codes
- ASCII 0 — NUL
- ASCII 1 — SOH
- ASCII 2 — STX
- ASCII 3 — ETX
- ASCII 5 — ENQ
- ASCII 6 — ACK
- ASCII 7 — BEL
- ASCII 8 — BS
- ASCII 9 — HT
- ASCII 10 — LF
- ASCII 11 — VT
Full ASCII table · Text to binary converter · Number base converter