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.

Definitions by

The definition of Null Character on this page is an original definition. If you would like to reference this page or cite this definition, you can use the green citation links above.

The goal of 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 the Null Character definition or would like to suggest a new technical term, please contact us.

Want to learn more tech terms? Subscribe to the daily or weekly newsletter and get featured terms and quizzes delivered to your inbox.

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.