Line feed (LF)
- Input
- LF
- Expected output
- DEC 10 · HEX 0A · escape \n
This is the line break Linux and macOS use; Windows writes CR before LF, so the same text can end up with two different line-ending formats.
ascii control characters
The first 32 ASCII codes, 0 through 31, plus code 127, do not stand for any visible letter or symbol: they were built in the 1960s to command printers, terminals and the data transmission itself, and a handful of them still show up in every text file and every terminal today.
This is the line break Linux and macOS use; Windows writes CR before LF, so the same text can end up with two different line-ending formats.
It inherited its name from mechanical tabulation: it moved a printer carriage to a fixed column before software offered configurable spacing.
Alone it is just a code; combined with brackets and numbers, like the red terminal example, it becomes the start of a full ANSI command.
No. ASCII covers only 128 codes. Unicode covers nearly all modern writing systems. The first 128 Unicode code points preserve ASCII compatibility, which makes every ASCII text a valid UTF-8 text as well.
No: LF (10) moves the cursor down to the next line, CR (13) returns the cursor to the start of the same line. Linux and macOS use LF alone for a line break; Windows uses both together, CR followed by LF, which is why a text file can look different after moving between operating systems.
Because Windows writes CR (13) before every LF (10), and Unix tools that only expect LF display the leftover CR as ^M at the end of the line; editors and Git resolve this by normalizing or converting automatically between CRLF and LF.
It is the foundation of the ANSI escape sequences terminals use for color, bold text and cursor positioning: code 27 alone opens the sequence, and whatever comes after it, like a bracket and numbers, tells the terminal which command to run.
Because strings in C, and plenty of binary protocols, use code 0 to mark where text ends; that is exactly why 'NUL byte injection' is a well-known class of security bug, where an attacker manages to truncate a string earlier than the program expected.
Everything runs in your browser: no search, text or code sequence leaves your device.