NAK

ASCII Character: Negative Acknowledge

ASCII Code 21 · Unicode U+0015 · Hex 0x15

negative-acknowledge nak

About the Negative Acknowledge Character

ASCII code 21 (0x15) represents the Negative Acknowledge (NAK) control character. This is a non-printable character defined in the original ASCII standard (1963). It belongs to the communication control group, used in data transmission protocols to manage the flow of information between devices. 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 21
Hexadecimal 0x15
Octal 025
Binary 00010101
Unicode U+0015
Unicode Name NEGATIVE ACKNOWLEDGE
HTML Numeric 
HTML Entity
URL Escape %15
UTF-8 (Hex) 15
Quoted-Printable =15

Source Code Examples

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

Navigate

Copied!