DevKits

ASCII 26

Substitute (SUB)

Control character

Sent by Ctrl+Z on Unix (suspend process). On Windows, Ctrl+Z at the start of a line signals EOF.

Common uses & context

Decimal 26 (0x1A) is the Substitute control character — one of the 33 non-printing codes in the C0 control block (0–31 plus DEL at 127). Control characters were designed to command teletype and terminal hardware rather than to represent visible glyphs, so SUB produces no letter, digit, or symbol on screen. Its8-bit binary form is 00011010 and its octal value is 0032.

Sent by Ctrl+Z on Unix (suspend process). On Windows, Ctrl+Z at the start of a line signals EOF.

BecauseSUB is invisible, it is easiest to work with by its numeric code. In most languages you can produce it with the escape or code-point form shown below, and detect it by comparing a byte against 26 (0x1A). When it turns up unexpectedly in text — pasted from a terminal, a legacy file, or a binary blob — it is usually the cause of "invisible character" bugs that break parsing or comparisons.

All encodings at a glance

Decimal26
Hexadecimal0x1A
Octal0032
Binary00011010
HTML numeric entity
URL encoding%1A
UTF-8 bytes0x1A

Code snippets

JavaScript

String.fromCharCode(26); // "SUB"
26.toString(16); // "1a"

Python

chr(26)           # control char SUB
ord(chr(26))      # 26
hex(26)           # '0x1a'

HTML

&#26;   <!-- numeric entity (no named entity for this character) -->

Programming notes

  • Detect it by numeric comparison: byte === 26 (0x1A). It has no printable glyph to match on.
  • Control characters below 32 are stripped or rejected by many text validators — check for them when sanitizing user input.
  • In a hex dump SUB shows as 1A; in a "cat -v" style view it may appear as a caret sequence.

Frequently asked questions

What character is ASCII code 26?

ASCII code 26 is Substitute (SUB), a non-printing control/whitespace character. In hexadecimal it is 0x1A and in binary 00011010. It has no visible glyph — it controls formatting or hardware instead of drawing a symbol.

What is 0x1A in ASCII?

Hexadecimal 0x1A equals decimal 26, which is theSubstitute control character (SUB). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x1A = 26) and look up that code point.

How do I write the character with code 26 in code?

In JavaScript use String.fromCharCode(26); in Python use chr(26); in HTML use the numeric entity &#26;. In a URL it is percent-encoded as %1A, and in UTF-8 it is stored as the byte sequence 0x1A.

Is ASCII 26 (SUB) printable?

No. SUB (code 26) is a control character with no visible glyph. It instructs software or hardware rather than displaying a symbol, which is why it often appears as an invisible or replacement character when it leaks into ordinary text.

Nearby codes

Encode & convert this character