CR

ASCII Character: Carriage Return

ASCII Code 13 · Unicode U+000D · Hex 0x0D

carriage-return cr

About the Carriage Return Character

ASCII code 13 (0x0D) represents the Carriage Return (CR) control character. This is a non-printable character defined in the original ASCII standard (1963). It belongs to the format effector group, which controls the layout and positioning of text in output devices like printers and terminals. 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 13
Hexadecimal 0x0D
Octal 015
Binary 00001101
Unicode U+000D
Unicode Name CARRIAGE RETURN
HTML Numeric 
HTML Entity
URL Escape %0D
UTF-8 (Hex) 0D
Quoted-Printable =0D

Source Code Examples

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

Navigate

Copied!