>_devtools

Line Ending Converter (CRLF, LF, CR)

Convert Windows CRLF, Unix LF, and classic Mac CR line endings, and count each kind.

What this does

Converts every line break in a text to one style. Mixed endings, such as a file edited on both Windows and Linux, all become the same.

The three styles

  • LF (\n): Linux, macOS, and most tools and repositories.
  • CRLF (\r\n): Windows, and many network protocols such as HTTP headers and email.
  • CR (\r): classic Mac OS before OS X, and a few legacy formats.

Getting the result with the right endings

Browsers and text editors normalize line breaks to LF while you type or paste, so the editors on this page look the same whichever style you choose. The output string itself does contain the chosen line endings: use Copy or Download to get them. To see the line endings that a file already has, use “Open file”; the counts of LF, CRLF, and CR appear under the editors.

Common cases

  • A shell script with CRLF fails with bad interpreter: /bin/bash^M; convert it to LF.
  • Git warns “CRLF will be replaced by LF”; normalize files before committing.
  • A Windows tool shows everything on one line; the file has LF only, so convert it to CRLF.

Privacy

This runs entirely in your browser. Nothing is uploaded.