Line-Ending (CRLF/LF) Converter & Detector
Paste in text to detect whether it uses Windows (CRLF), Unix (LF) or classic Mac (CR) line endings, then convert between them.
About this tool
Windows uses a two-character CRLF (\r\n) line ending, while Unix, Linux and modern macOS use a single-character LF (\n). Old classic Mac OS (pre-OS X) used a lone CR (\r), which still turns up occasionally in legacy files. Mixed line endings in the same file can cause diff noise in version control, broken parsing in some tools, and subtly different file sizes — CRLF adds one extra byte per line compared to LF or CR, which matters for large text files, CSVs or anything size-sensitive.
For the most reliable detection, load a file with the button above rather than typing directly: pasting still works, but some browsers visually display all line breaks the same way in a text box, so loading the original file guarantees byte-exact results. Converting and copying always use the exact converted bytes, even though CRLF and LF can look identical on screen.