Null Character

A null character is a special type of character, called a control character, with all its bits set to zero. It is often used in computer programming languages to mark the end of a string. In practical applications, such as database and spreadsheet programs, null characters are used as filler spaces.

In most character encoding sets, such as UTF-8 and ASCII, the null character is the first character in the set. When represented in binary, it appears as all 0s, or 00000000.

A null character in computer source code is often represented by the escape character sequence \0, and is used by programmers to manually set the end of a string. For example, a piece of programming code that stores the text string "Help" will store the following individual characters:

"H" "e" "l" "p" "\0"

The null character, \0, marks the end of the string. Since the null character is a single byte, it is more computationally efficient than using several bytes to set a length when the string is created.

Updated September 30, 2022 by Brian P.

quizTest Your Knowledge

What is the most common "Full HD" video resolution?

A
1366 × 768
0%
B
1600 x 1200
0%
C
1920 x 1080
0%
D
2560 x 1440
0%
Correct! Incorrect!     View the HD definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Null Character on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.