Toolman

ASCII 0

ASCII 0 is Null — the control character NUL.

Every representation

CharacterNUL (not printable)
NameNull
Decimal0
Hexadecimal0x00
Octal0000
Binary00000000
HTML entity�
Escape sequence\\0
UnicodeU+0000
KeyboardCtrl+@
GroupControl character

What it is for

Represents nothing at all. C uses it to mark the end of a string, which is why a C string cannot contain one and why "null-terminated" is a phrase at all. Writing a NUL into text that later reaches C code is a classic source of silent truncation.

Where the number comes from

Codes 0 to 31 were reserved for control: instructions to a teleprinter rather than characters to print. Code 0 is Ctrl+@ because the Ctrl key was originally wired to clear the top two bits of whatever you typed, mapping the letter @ at 64 down to 0.

Frequently asked questions

What is ASCII 0?

Null (NUL), a control character. In hexadecimal it is 0x00, in octal 0000, and in binary 00000000.

How do I type ASCII 0?

Press Ctrl+@ in a terminal. In a string literal you can write it as \\0 or \\x00 in most languages.

Is ASCII 0 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

Full ASCII table · Text to binary converter · Number base converter