Escape
Escape in character encoding
ESC is ASCII code 27 (hex 0x1B), a control character that signals "the next bytes are a command, not text." ANSI escape sequences use ESC as a prefix for terminal formatting:
Escape sequences are everywhere: the \n, \t, and \\ in programming languages are escape sequences that represent line feed, tab, and backslash. URL encoding escapes unsafe characters as %XX. HTML entities escape reserved characters as &name; or &#number;. The common thread: an escape mechanism lets you represent characters that would otherwise be interpreted as commands or markup. See our URL encoder and HTML entity tool.
ESC[31m turns text red, ESC[0m resets formatting, and ESC[2J clears the screen.Escape sequences are everywhere: the \n, \t, and \\ in programming languages are escape sequences that represent line feed, tab, and backslash. URL encoding escapes unsafe characters as %XX. HTML entities escape reserved characters as &name; or &#number;. The common thread: an escape mechanism lets you represent characters that would otherwise be interpreted as commands or markup. See our URL encoder and HTML entity tool.