CR
Carriage Return
ControlASCII 13 | Hex 0x0D | U+000D
CR (code 13) returns the cursor to the beginning of the current line. Typewriters performed this as a physical carriage movement, and teletype machines inherited the concept. Windows uses the two-byte sequence CR+LF (0x0D 0x0A) for line endings, while Unix uses LF alone. HTTP/1.1 (RFC 2616) requires CRLF to terminate header lines, and SMTP mandates CRLF between email headers. Bare CR without LF is treated as a line ending only in classic Mac OS (pre-2001) text files.
ASCII Code
Decimal
13
Hexadecimal
0x0D
Octal
15
Binary
0000 1101
Unicode
Code Point
U+000D
Escape
\u000d
UTF-8 Hex
0xE2 0x90 0x8D
UTF-8 Binary
111000101001000010001101
UTF-16
0x000D
UTF-32
0x0000000D
HTML Entities
Numeric
Hex

How to Type
HTML Entity
Unicode InputU+000D
Source Code Representations
C / Java
"\u000D"CSS
\000DJavaScript
"\u000D"Perl
\x{000D}Python 2
u"\u000D"Python 3
\u000DRuby
\u{000D}Frequently Asked Questions
What is ASCII code 13?
ASCII code 13 represents the Carriage Return character. In hexadecimal it is 0x0D, in binary 0000 1101, and in octal 15. This is a non-printable control character used for device signaling and data transmission control.
How do I type ASCII 13 on a keyboard?
Control characters are typically entered using Ctrl key combinations. For example, Ctrl+M produces ASCII 13 in most terminal emulators. You can also use the HTML entity in web pages.