encyclopegia.org

Null character

The null character is a control character with the value zero. Many character sets include a code point for a null character including Unicode (Universal Coded Character Set), ASCII (ISO/IEC 646), Baudot, ITA2 codes, the C0 control code, and EBCDIC. In modern character sets, the null character has a code point value of zero which is generally translated to a single code unit with a zero value. For instance, in UTF-8, it is a single, zero byte. Originally, its meaning was like NOP when sent to a printer or a terminal, it had no effect (although some terminals incorrectly displayed it as space). When electromechanical teleprinters were used as computer output devices, one or more null characters were sent at the end of each printed line to allow time for the mechanism to return to the first printing position on the next line. On punched tape, the character is represented with no holes at all, so a new unpunched tape is initially filled with null characters, and often text could be inserted at a reserved space of null characters by punching the new characters into the tape over the nulls. A null-terminated string is a commonly used data structure in the C programming language, its many derivative languages and other programming contexts that uses a null character to indicate the end of a string.…

The null character is a control character with the value zero. Many character sets include a code point for a null character including Unicode (Universal Coded Character Set), ASCII (ISO/IEC 646), Baudot, ITA2 codes, the C0 control code, and EBCDIC. In modern character sets, the null character has a code point value of zero which is generally translated to a single code unit with a zero value. For instance, in UTF-8, it is a single, zero byte. Originally, its meaning was like NOP when sent to a printer or a terminal, it had no effect (although some terminals incorrectly displayed it as space). When electromechanical teleprinters were used as computer output devices, one or more null characters were sent at the end of each printed line to allow time for the mechanism to return to the first printing position on the next line. On punched tape, the character is represented with no holes at all, so a new unpunched tape is initially filled with null characters, and often text could be inserted at a reserved space of null characters by punching the new characters into the tape over the nulls. A null-terminated string is a commonly used data structure in the C programming language, its many derivative languages and other programming contexts that uses a null character to indicate the end of a string. This design allows a string to be any length at the cost of only one extra character of memory. The common competing design for a string stores the length of the string as an integer data type, but this limits the size of the string to the range of the integer (for example, 255 for a byte). For byte storage, the null character can be called a null byte. ==External links== Null Byte Injection WASC Threat Classification Null Byte Attack section Poison Null Byte Introduction Introduction to Null Byte Attack Apple null byte injection QR code vulnerability

References

  1. ASCII format for Network Interchange . IETF . sec. 5.2. doi : 10.17487/RFC0020 . RFC 20 . NUL (Null): The all-zeros character which may serve to accomplish time fill and media fill. Wikipedia revision 1361774466, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "ASCII format for Network Interchange . IETF . sec. 5.2. doi : 10.17487/RFC0020 . RFC 20 . NUL (Null): The all-zeros character which may serve to accomplish time fill and media fill. Wikipedia revision 1361774466, retrieved 2026-11-18." ASCII format for Network Interchange. 2026-11-17. https://www.rfc-editor.org/rfc/rfc20#section-5.2. Accessed 24 November 2026.

    Chicago "ASCII format for Network Interchange . IETF . sec. 5.2. doi : 10.17487/RFC0020 . RFC 20 . NUL (Null): The all-zeros character which may serve to accomplish time fill and media fill. Wikipedia revision 1361774466, retrieved 2026-11-18." ASCII format for Network Interchange. 2026-11-17. https://www.rfc-editor.org/rfc/rfc20#section-5.2.

    APA ASCII format for Network Interchange. (2026). ASCII format for Network Interchange . IETF . sec. 5.2. doi : 10.17487/RFC0020 . RFC 20 . NUL (Null): The all-zeros character which may serve to accomplish time fill and media fill. Wikipedia revision 1361774466, retrieved 2026-11-18. Retrieved November 24, 2026, from https://www.rfc-editor.org/rfc/rfc20#section-5.2

  2. Null Byte Injection WASC Threat Classification Null Byte Attack section. Wikipedia revision 1361774466, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "Null Byte Injection WASC Threat Classification Null Byte Attack section. Wikipedia revision 1361774466, retrieved 2026-11-18." Null Byte Injection WASC Threat Classification Null Byte Attack section. 2026-11-17. http://projects.webappsec.org/Null-Byte-Injection. Accessed 24 November 2026.

    Chicago "Null Byte Injection WASC Threat Classification Null Byte Attack section. Wikipedia revision 1361774466, retrieved 2026-11-18." Null Byte Injection WASC Threat Classification Null Byte Attack section. 2026-11-17. http://projects.webappsec.org/Null-Byte-Injection.

    APA Null Byte Injection WASC Threat Classification Null Byte Attack section. (2026). Null Byte Injection WASC Threat Classification Null Byte Attack section. Wikipedia revision 1361774466, retrieved 2026-11-18. Retrieved November 24, 2026, from http://projects.webappsec.org/Null-Byte-Injection

  3. The set of control characters of the ISO 646 · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "The set of control characters of the ISO 646." "The set of control characters of the ISO 646" (PDF). 2026-11-17. https://web.archive.org/web/20140512221203/http://kikaku.itscj.ipsj.or.jp/ISO-IR/001.pdf. Accessed 24 November 2026.

    Chicago "The set of control characters of the ISO 646." "The set of control characters of the ISO 646" (PDF). 2026-11-17. https://web.archive.org/web/20140512221203/http://kikaku.itscj.ipsj.or.jp/ISO-IR/001.pdf.

    APA "The set of control characters of the ISO 646" (PDF). (2026). The set of control characters of the ISO 646. Retrieved November 24, 2026, from https://web.archive.org/web/20140512221203/http://kikaku.itscj.ipsj.or.jp/ISO-IR/001.pdf

  4. Unicode Character 'NULL' (U+0000) · retrieved 2018-10-19 · rev 1361774466
    Cite this reference

    MLA "Unicode Character 'NULL' (U+0000)." 2018-10-19. https://www.fileformat.info/info/unicode/char/0000/index.htm. Accessed 24 November 2026.

    Chicago "Unicode Character 'NULL' (U+0000)." 2018-10-19. https://www.fileformat.info/info/unicode/char/0000/index.htm.

    APA encyclopegia.org. (2018). Unicode Character 'NULL' (U+0000). Retrieved November 24, 2026, from https://www.fileformat.info/info/unicode/char/0000/index.htm

  5. C0 Controls and Basic Latin · retrieved 2018-10-19 · rev 1361774466
    Cite this reference

    MLA "C0 Controls and Basic Latin." "C0 Controls and Basic Latin" (PDF). 2018-10-19. https://www.unicode.org/charts/PDF/U0000.pdf. Accessed 24 November 2026.

    Chicago "C0 Controls and Basic Latin." "C0 Controls and Basic Latin" (PDF). 2018-10-19. https://www.unicode.org/charts/PDF/U0000.pdf.

    APA "C0 Controls and Basic Latin" (PDF). (2018). C0 Controls and Basic Latin. Retrieved November 24, 2026, from https://www.unicode.org/charts/PDF/U0000.pdf

  6. A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used to terminate a character string literal. · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used to terminate a character string literal." "A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1361774466. Accessed 24 November 2026.

    Chicago "A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used to terminate a character string literal." "A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1361774466.

    APA "A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used. (2026). A byte with all bits set to 0, called the null character , shall exist in the basic execution character set; it is used to terminate a character string literal. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1361774466

  7. A string is a contiguous sequence of characters terminated by and including the first null character · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "A string is a contiguous sequence of characters terminated by and including the first null character." "A string is a contiguous sequence of characters terminated by and including the first null character" — ANSI/ISO 9899:1. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1361774466. Accessed 24 November 2026.

    Chicago "A string is a contiguous sequence of characters terminated by and including the first null character." "A string is a contiguous sequence of characters terminated by and including the first null character" — ANSI/ISO 9899:1. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1361774466.

    APA "A string is a contiguous sequence of characters terminated by and including the first null character" — ANSI/ISO 9899:1. (2026). A string is a contiguous sequence of characters terminated by and including the first null character. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1361774466

  8. 17.5.2.1.4.1 Byte strings · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "17.5.2.1.4.1 Byte strings." "17. 2026-11-17. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf. Accessed 24 November 2026.

    Chicago "17.5.2.1.4.1 Byte strings." "17. 2026-11-17. https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf.

    APA "17. (2026). 17.5.2.1.4.1 Byte strings. Retrieved November 24, 2026, from https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf

  9. In YAML this combination is a separate escape sequence . Wikipedia revision 1361774466, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "In YAML this combination is a separate escape sequence . Wikipedia revision 1361774466, retrieved 2026-11-18." In YAML this combination is a separate escape sequence. 2026-11-17. https://en.wikipedia.org/wiki/YAML. Accessed 24 November 2026.

    Chicago "In YAML this combination is a separate escape sequence . Wikipedia revision 1361774466, retrieved 2026-11-18." In YAML this combination is a separate escape sequence. 2026-11-17. https://en.wikipedia.org/wiki/YAML.

    APA In YAML this combination is a separate escape sequence. (2026). In YAML this combination is a separate escape sequence . Wikipedia revision 1361774466, retrieved 2026-11-18. Retrieved November 24, 2026, from https://en.wikipedia.org/wiki/YAML

  10. Kernighan and Ritchie, C , p. 38: "The character constant '\0' represents the character with value zero, the null character. '\0' is often written instead of 0 to emphasize the character nature of some expression, but the numeric value is just 0." Wikipedia revision 1361774466, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1361774466
    Cite this reference

    MLA "Kernighan and Ritchie, C , p. 38: "The character constant '\0' represents the character with value zero, the null character. '\0' is often written instead of 0 to emphasize the character nature of some expression, but the numeric value is just 0." Wikipedia revision 1361774466, retrieved 2026-11-18." Kernighan and Ritchie, C , p. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1361774466. Accessed 24 November 2026.

    Chicago "Kernighan and Ritchie, C , p. 38: "The character constant '\0' represents the character with value zero, the null character. '\0' is often written instead of 0 to emphasize the character nature of some expression, but the numeric value is just 0." Wikipedia revision 1361774466, retrieved 2026-11-18." Kernighan and Ritchie, C , p. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1361774466.

    APA Kernighan and Ritchie, C , p. (2026). Kernighan and Ritchie, C , p. 38: "The character constant '\0' represents the character with value zero, the null character. '\0' is often written instead of 0 to emphasize the character nature of some expression, but the numeric value is just 0." Wikipedia revision 1361774466, retrieved 2026-11-18. Retrieved November 24, 2026, from https://en.wikipedia.org/w/index.php?oldid=1361774466

Cite this article

MLA

"Null character." encyclopegia.org, 2026, https://encyclopegia.org/wiki/null-character. Accessed 24 November 2026.

Chicago

"Null character." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/null-character.

APA

encyclopegia.org. (2026). Null character. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/null-character

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

character body

stub · references available

character encoding in HTML

stub · references available

character encoding

stub · references available

Social character

stub · references available

mascot character

stub · references available

control character

stub · references available

The World of Null-A

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1361774466 · 0.5 · snapshot enwiki-001361774466

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.