Toolman

ASCII code for escape

27

Escape — a control character, not printable

Decimal27
Hexadecimal0x1B
Octal0033
Binary00011011
HTML entity

What it is

Introduces an escape sequence. Nearly all terminal colour, cursor movement and formatting is ESC followed by [ and parameters — the ANSI escape codes. It is also the byte your Esc key sends.

The full entry

ASCII 27 in full — the code point page, with what sits either side of it and how the character is encoded elsewhere.

Frequently asked questions

What is the ASCII code for escape?

The ASCII code for escape is 27 in decimal, 0x1B in hexadecimal and 0033 in octal.

What is escape in binary?

00011011 — eight bits, though ASCII only defines seven, so the top bit is always zero.

Is escape a printable character?

No. Escape is a control character — an instruction to a teleprinter rather than a mark on paper, which is why most tables show an empty cell for it.

Other characters

Every character by name · The ASCII table · Text to binary converter