What Is 0x0D
Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.
Last updated: April 11, 2026
Key Facts
- 0x0D equals 13 in decimal; hexadecimal is base-16 notation using digits 0-9 and letters A-F
- ASCII (American Standard Code for Information Interchange) was standardized in 1963 with 128 characters including control codes
- Windows line endings use CRLF (0x0D 0x0A), while Unix/Linux use LF (0x0A) alone
- Part of C0 control codes range (0x00-0x1F), designed for device control rather than text display
- Still widely used in modern protocols including HTTP, SMTP, FTP, and various programming languages
Overview
0x0D is hexadecimal notation representing the decimal number 13, which corresponds to the Carriage Return (CR) control character in the ASCII standard. The "0x" prefix indicates hexadecimal base-16 numbering, where A-F represent values 10-15. This non-printable character originated from mechanical typewriter technology, where pressing the carriage return lever would move the print head back to the beginning of the line without advancing to the next line.
In modern computing, 0x0D remains fundamentally important in text file formatting and data transmission protocols. While it no longer physically controls hardware, it serves as a crucial control character for defining line endings, marking message boundaries in network protocols, and managing text processing in programming languages. Understanding 0x0D is essential for developers working with file I/O, cross-platform compatibility, and network communications.
How It Works
The hexadecimal value 0x0D functions as a control code with specific behaviors in different computing contexts:
- Hexadecimal Conversion: 0x0D translates to 13 in decimal using base-16 mathematics (0×16¹ + 13×16⁰ = 13). This notation is widely used in programming, memory addressing, and technical documentation for its compact representation.
- ASCII Character Representation: ASCII, standardized in 1963, assigned 0x0D to the Carriage Return function. It belongs to the C0 control codes range (0x00-0x1F), which are non-printable characters designed for device control rather than displaying visible text.
- Line Ending Behavior: On Windows systems, a line ending combines 0x0D with 0x0A (Line Feed), creating CRLF. Unix and Linux systems use only 0x0A (LF), which sometimes causes compatibility issues when files transfer between operating systems.
- Protocol Usage: Many internet protocols including HTTP, SMTP, and FTP explicitly require CRLF (0x0D 0x0A) sequences for message formatting. Web servers and email systems parse these sequences to identify header boundaries and message structure.
- Text Processing: Modern programming languages handle 0x0D through escape sequences like \r in C, Python, and JavaScript. Text editors and IDEs can convert between different line ending formats to maintain compatibility.
Key Comparisons
| Aspect | 0x0D (Carriage Return) | 0x0A (Line Feed) | 0x0D 0x0A (CRLF) |
|---|---|---|---|
| Decimal Value | 13 | 10 | 13 + 10 |
| Primary Use | Move cursor to line start | Advance to next line | Complete line ending |
| Operating System | Typewriter origin (1870s) | Added by ASCII (1963) | Windows standard |
| Escape Sequence | \r in most languages | \n in most languages | \r\n on Windows |
| Unix/Linux Adoption | Not used alone | Used as line ending | Not standard |
Why It Matters
- Cross-Platform Compatibility: Different operating systems using different line endings causes files to display incorrectly when transferred between Windows, Mac, and Linux systems. Version control systems like Git include settings to normalize line endings and prevent unnecessary file changes.
- Network Protocol Compliance: Internet standards require CRLF (0x0D 0x0A) in HTTP headers, email messages, and FTP commands. Incorrect line ending sequences can cause servers to reject requests or fail to parse commands properly.
- Data Integrity: Binary file processing must distinguish between text requiring line ending conversion and binary data where 0x0D has no special meaning. Accidentally converting line endings in binary files corrupts data irreversibly.
- Legacy System Support: Modern systems still support 0x0D for backward compatibility with legacy applications, mainframe systems, and embedded devices that expect Carriage Return control characters.
Understanding 0x0D demonstrates the lasting impact of mechanical technology on modern digital standards. Although typewriters have long been obsolete, the Carriage Return character they inspired remains embedded in fundamental computing protocols and file formats used daily across billions of devices. For developers, system administrators, and technical professionals, proper handling of line endings and control characters is essential for building reliable, cross-platform compatible systems. The continued relevance of 0x0D after over 150 years illustrates how standardized conventions, once established, persist through technological evolution and shape computing practices for generations.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- ASCII - WikipediaCC-BY-SA-4.0
- Carriage Return - WikipediaCC-BY-SA-4.0
- Newline - WikipediaCC-BY-SA-4.0
Missing an answer?
Suggest a question and we'll generate an answer for it.