Skip to content

Line Ending Converter

CRLF to LF and back — the fix for a file that shows as entirely changed in Git.

Drop a text file here, or click to choose one

Converted on your device — the file is never uploaded

Converted

Quick Tool Overview

The Line Ending Converter shows which line endings a file really uses — counting CRLF, LF and CR separately — and rewrites them, with options for trailing whitespace, the final newline and the UTF-8 BOM.

What it does
Converts between CRLF, LF and CR
You give it
A text or source file
You get back
The same file with consistent endings
Best for
Git diffs, shell scripts and cross-platform files
Converters Free, unlimited use No sign-up Runs in your browser

About the Line Ending Converter

Windows ends a line with two characters, CRLF; Linux and macOS use one, LF. The difference is invisible until it is not: Git shows a whole file as rewritten, a shell script fails with an error that names a character you cannot see, a config file silently stops working.

Paste the file — or drop it — and see what it actually uses, counted line by line, including files that mix all three kinds. Convert every line to LF, CRLF or classic CR, strip the trailing spaces that make diffs noisy, add or remove the final newline that Git complains about, and remove the UTF-8 byte order mark that breaks shebang lines and PHP output. Nothing else in the file is touched.

Key features of the Line Ending Converter

Counts each kind

Shows exactly how many CRLF, LF and CR endings a file mixes.

Trailing whitespace

Strip the spaces and tabs that make diffs noisy.

Final newline

Add or remove the one Git complains about.

BOM removal

Delete the invisible marker that breaks shebang lines and PHP output.

Nothing else touched

Only whitespace changes — the content is untouched.

How to use the Line Ending Converter

  1. 1

    Paste or drop the file

    Any text or source file.

  2. 2

    Read what it uses now

    CRLF, LF, CR or a mix, with counts of each.

  3. 3

    Choose what you need

    LF for Git and Linux, CRLF for Windows tools.

  4. 4

    Copy or download

    Only the line endings change.

Frequently asked questions

Because every line ending changed. An editor that saved CRLF over an LF file rewrites every line as far as Git is concerned. Converting to LF usually restores a sane diff.

Reviews of the Line Ending Converter

What people who use the Line Ending Converter think of it. Reviews come from visitors and are posted as written.

No ratings yet

Yours would be the first.

  • 5 0 reviews rated 5 stars
  • 4 0 reviews rated 4 stars
  • 3 0 reviews rated 3 stars
  • 2 0 reviews rated 2 stars
  • 1 0 reviews rated 1 star

Write a review

Used this tool? Your rating helps the next person decide.

Your rating

Plain text only — links, email addresses and HTML are not accepted. Your name and review are shown publicly; nothing else is collected. See the privacy policy.

0 reviews

Newest first

No reviews yet

Be the first to rate the Line Ending Converter. It takes half a minute and no account.

Write the first review

More converters