CRLF to LF Line Break Normalizer

Convert Windows CRLF line endings to Unix LF (or back), count mixed line breaks and add a final newline.

  • 100% free
  • Private in browser
  • No signup
  • No watermarks
CRLF found
0
LF found
0
CR found
0
Bytes saved
0

Normalized text

—

Rate this tool

Be the first to rate — helps others and improves this page.

About CRLF to LF Line Break Normalizer

Mixed line endings cause noisy Git diffs, broken shell scripts ("bad interpreter: ^M") and failing linters. Paste your text to see how many CRLF, LF and CR breaks it contains, then convert everything to one style and copy or download the result.

How to use CRLF to LF Line Break Normalizer

  1. Paste the text or file contents with mixed line endings.
  2. Choose LF, CRLF or CR as the target line ending.
  3. Optionally trim trailing spaces and ensure a final newline, then copy or download the result.

Key features

  • Counts CRLF, LF and lone CR line breaks
  • Converts to LF, CRLF or CR in one click
  • Optional trailing-whitespace trimming
  • Ensures a single final newline (POSIX style)
  • Shows bytes saved; runs in your browser

Frequently asked questions

What is the difference between CRLF and LF?
Windows ends lines with carriage return + line feed (\r\n, CRLF). Linux and macOS use a single line feed (\n, LF). Classic Mac OS used a lone carriage return (\r).
Why do CRLF line endings break shell scripts?
Bash treats the \r as part of the command, so a script saved with CRLF fails with errors like "/bin/bash^M: bad interpreter". Converting to LF fixes it.
How do I stop Git from changing line endings?
Add a .gitattributes file such as "* text=auto eol=lf", or set core.autocrlf appropriately for your platform, then renormalize once with this tool or git add --renormalize.
Why add a final newline?
POSIX defines a line as ending with a newline. Many tools and linters expect it, and Git shows "No newline at end of file" otherwise.
Is my text uploaded?
No. Conversion happens entirely in your browser.
CRLF to LF Converter – Line Ending Normalizer | TheToolss