ASCII 13
Carriage Return (CR)
Control character
Returns the cursor to the start of the line (\r). Used with LF as line terminator on Windows (CRLF).
Common uses & context
Decimal 13 (0x0D) is Carriage Return, a whitespace code.Returns the cursor to the start of the line (\r). Used with LF as line terminator on Windows (CRLF).
Whitespace codes are printable in the sense that they occupy horizontal or vertical space, but they carry no ink. That makes CR a frequent source of hard-to-see bugs: trailing spaces that break string equality, mixed tabs and spaces that confuse indentation-sensitive languages, or the wrong newline convention (LF vs CRLF) between operating systems. Its binary byte is 00001101.
All encodings at a glance
| Decimal | 13 |
| Hexadecimal | 0x0D |
| Octal | 0015 |
| Binary | 00001101 |
| HTML numeric entity | |
| URL encoding | %0D |
| UTF-8 bytes | 0x0D |
Code snippets
JavaScript
String.fromCharCode(13); // "CR"
13.toString(16); // "0d"Python
chr(13) # control char CR
ord(chr(13)) # 13
hex(13) # '0x0d'HTML
<!-- numeric entity (no named entity for this character) -->Programming notes
- ▸Carriage Return (code 13) is invisible but significant — trailing or mixed whitespace silently breaks string equality and diffs.
- ▸Normalize line endings and trim whitespace explicitly rather than assuming input is clean.
- ▸Its byte value 13 (0x0D) lets you match it precisely in a byte-level scan.
Frequently asked questions
What character is ASCII code 13?
ASCII code 13 is Carriage Return (CR), a non-printing control/whitespace character. In hexadecimal it is 0x0D and in binary 00001101. It has no visible glyph — it controls formatting or hardware instead of drawing a symbol.
What is 0x0D in ASCII?
Hexadecimal 0x0D equals decimal 13, which is theCarriage Return control character (CR). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x0D = 13) and look up that code point.
How do I write the character with code 13 in code?
In JavaScript use String.fromCharCode(13); in Python use chr(13); in HTML use the numeric entity . In a URL it is percent-encoded as %0D, and in UTF-8 it is stored as the byte sequence 0x0D.