top of page

Windows, Linux and Classic Mac OS Line Endings

Updated: May 14, 2023


This post lists the line endings that Windows/DOS, Linux/Unix and Mac prior to macOS use.


Windows/DOS

  • Carriage Return (CR) + Line Feed (LF), escape sequence: "\r\n"

  • hex: 0x0D 0x0A, dec: 13 10


Linux/Unix, Mac from OS X a.k.a macOS

  • Line Feed (LF), escape sequence: "\n"

  • hex: 0x0A, dec: 10


Mac Prior to OS X a.k.a. Mac OS 9 a.k.a. Classic Mac OS

  • Carriage Return (CR), escape sequence: "\r"

  • hex: 0x0D, dec: 13


References

  • Newline Wiki at [link]

  • DOS vs. Unix Line Endings at [link]

  • Classic Mac a.k.a. Mac OS 9 Wiki at [link]


bottom of page