ASCII 10
Line Feed (LF)
Control character
The newline character (\n) on Unix and modern systems. Advances to the next line.
Common uses & context
Decimal 10 (0x0A) is Line Feed, a whitespace code.The newline character (\n) on Unix and modern systems. Advances to the next line.
Whitespace codes are printable in the sense that they occupy horizontal or vertical space, but they carry no ink. That makes LF 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 00001010.
All encodings at a glance
| Decimal | 10 |
| Hexadecimal | 0x0A |
| Octal | 0012 |
| Binary | 00001010 |
| HTML numeric entity | |
| URL encoding | %0A |
| UTF-8 bytes | 0x0A |
Code snippets
JavaScript
String.fromCharCode(10); // "LF"
10.toString(16); // "0a"Python
chr(10) # control char LF
ord(chr(10)) # 10
hex(10) # '0x0a'HTML
<!-- numeric entity (no named entity for this character) -->Programming notes
- ▸Line Feed (code 10) 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 10 (0x0A) lets you match it precisely in a byte-level scan.
Frequently asked questions
What character is ASCII code 10?
ASCII code 10 is Line Feed (LF), a non-printing control/whitespace character. In hexadecimal it is 0x0A and in binary 00001010. It has no visible glyph — it controls formatting or hardware instead of drawing a symbol.
What is 0x0A in ASCII?
Hexadecimal 0x0A equals decimal 10, which is theLine Feed control character (LF). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x0A = 10) and look up that code point.
How do I write the character with code 10 in code?
In JavaScript use String.fromCharCode(10); in Python use chr(10); in HTML use the numeric entity . In a URL it is percent-encoded as %0A, and in UTF-8 it is stored as the byte sequence 0x0A.