Text files end their lines differently across platforms: Unix and macOS use a single LF, Windows uses CRLF, and classic Mac used a bare CR. This tool detects which you have, warns about mixed files, and rewrites everything to one consistent style.
How it works
Conversion goes through a normalised intermediate so no input mix can corrupt the result:
1. Normalise: replace every \r\n and every lone \r with \n
(now the text uses only LF, whatever it started with)
2. Expand to the target:
LF → \n
CRLF → \r\n
CR → \r
Detection counts CRLF first, then remaining lone CR and lone LF, so a \r\n is never double-counted. If more than one style appears, the tool flags the file as mixed.
Example and tips
A shell script saved on Windows with CRLF often fails on Linux with errors like bad interpreter because the carriage return clings to the shebang line — converting to LF fixes it instantly. For source code and anything tracked in Git, standardise on LF; reserve CRLF for the rare Windows tool that truly demands it.