Line Ending Normalizer: CRLF, LF and CR Converter

Converts line endings and, for files, reports which endings the file has.

Use the tool

Why this tool exists

Mixed line endings cause noisy diffs, broken shell scripts and odd characters. Windows uses CRLF, Unix and macOS use LF, and very old Mac files use CR.

Browsers turn every line break in a text box into LF, so pasted text cannot show its original endings. Choose a file to see the counts and get a converted copy to download. You can also remove trailing spaces and end with one line break. Binary files are refused.

How to use it

  1. Choose a file, or paste text.
  2. Pick the ending to convert to.
  3. Optionally trim trailing spaces and end with one line break.
  4. Download the file or copy the text.

Frequently asked questions

Why does pasted text not show CRLF?

Browsers normalise line breaks in text boxes. Use the file option.

Is my file uploaded?

No.

What encoding is assumed?

UTF-8.

Which ending should I use?

LF for most code and CRLF for Windows batch files.