Toolman

ASCII code for carriage return

13

Carriage Return — a control character, not printable

Decimal13
Hexadecimal0x0D
Octal0015
Binary00001101
HTML entity
String escape\r

What it is

Returned the print head to the start of the line without advancing the paper. Windows line endings are CR followed by LF because a teletype needed both movements. A lone CR is what lets a progress bar overwrite itself.

The full entry

ASCII 13 in full — the code point page, with what sits either side of it and how the character is encoded elsewhere.

Frequently asked questions

What is the ASCII code for carriage return?

The ASCII code for carriage return is 13 in decimal, 0x0D in hexadecimal and 0015 in octal.

What is carriage return in binary?

00001101 — eight bits, though ASCII only defines seven, so the top bit is always zero.

How do I write carriage return in a string?

Most languages accept the escape \r. Writing the raw character instead works in some contexts and breaks in others, which is what the escape exists to avoid.

Other characters

Every character by name · The ASCII table · Text to binary converter