Skip to content
ASCII World
SUB

Substitute

ControlASCII 26 | Hex 0x1A | U+001A
SUB (code 26) replaces characters that are invalid or unrepresentable in a given context. In CP/M and early DOS, Ctrl+Z (SUB) marked the end of a text file because the FAT file system tracked file sizes in clusters rather than exact byte counts. Windows inherited this convention, and some C library functions on Windows still treat Ctrl+Z as EOF in text mode. Unix never adopted this convention, using actual file length metadata instead. The Unicode Replacement Character (U+FFFD) serves a similar substitution role for invalid byte sequences.

ASCII Code

Decimal
26
Hexadecimal
0x1A
Octal
32
Binary
0001 1010

Unicode

Code Point
U+001A
Escape
\u001a
UTF-8 Hex
0xE2 0x90 0x9A
UTF-8 Binary
111000101001000010011010
UTF-16
0x001A
UTF-32
0x0000001A

HTML Entities

Numeric

Hex


How to Type

HTML Entity

Unicode InputU+001A

Source Code Representations

C / Java
"\u001A"
CSS
\001A
JavaScript
"\u001A"
Perl
\x{001A}
Python 2
u"\u001A"
Python 3
\u001A
Ruby
\u{001A}

Frequently Asked Questions

What is ASCII code 26?
ASCII code 26 represents the Substitute character. In hexadecimal it is 0x1A, in binary 0001 1010, and in octal 32. This is a non-printable control character used for device signaling and data transmission control.
How do I type ASCII 26 on a keyboard?
Control characters are typically entered using Ctrl key combinations. For example, Ctrl+Z produces ASCII 26 in most terminal emulators. You can also use the HTML entity  in web pages.