ESC

ASCII Character: Escape

ASCII Code 27 · Unicode U+001B · Hex 0x1B

escape esc

About the Escape Character

ASCII code 27 (0x1B) represents the Escape (ESC) control character. This is a non-printable character defined in the original ASCII standard (1963). It is a miscellaneous control character with special significance in text processing and data communication. Control characters occupy codes 0–31 and 127 in the ASCII table and were originally designed for controlling hardware devices, managing communication links, and formatting text output. While many control characters have become obsolete with modern computing, several like LF (Line Feed), CR (Carriage Return), TAB, and ESC remain essential in everyday programming and text processing.

Encoding Details

ASCII Code 27
Hexadecimal 0x1B
Octal 033
Binary 00011011
Unicode U+001B
Unicode Name ESCAPE
HTML Numeric 
HTML Entity
URL Escape %1B
UTF-8 (Hex) 1B
Quoted-Printable =1B

Source Code Examples

JavaScript
// Using escape sequence
let char = '\x1B';
// Using String.fromCharCode
let char2 = String.fromCharCode(27);
Python
# Using escape sequence
char = '\x1B'
# Using chr()
char = chr(27)
HTML
<!-- Using HTML entity -->
&#27;
C#
// Using escape sequence
char c = '\x1B';
// Using cast
char c2 = (char)27;

Navigate

Copied!