Line Ending Converter screenshot

Line Ending Converter

Normalise CRLF and lone CR line endings to LF so a pasted file has one newline convention.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No upload
Deterministic

What this page does

A file with mixed Windows and Unix line endings confuses diffs and scripts; the page rewrites every CRLF and lone CR as one LF.

How to use it

Paste or type the text and press Run. The result appears beside the form. With "alpha\r\nbeta\rgamma\ndelta", the page gives:

alpha
beta
gamma
delta

The rule it applies

Each CRLF pair becomes one LF, and each remaining lone CR becomes one LF. LF already in the text is kept, and nothing else changes.

Every character other than a carriage return is copied through unchanged, including trailing spaces and blank lines. Every character is read in your browser: nothing is uploaded and nothing is stored.

A file with mixed Windows and Unix line endings confuses diffs and scripts; the page rewrites every CRLF and lone CR as one LF.

The rule this page applies: Each CRLF pair becomes one LF, and each remaining lone CR becomes one LF. LF already in the text is kept, and nothing else changes.

Worked example: "alpha\r\nbeta\rgamma\ndelta" gives the output recorded in the example below, character for character.

How to use the Line Ending Converter

Paste or type the text into the box and press Run. The result appears beside the form, and pressing Run again re-reads whatever is in the box.

This page has nothing to configure: it reads the text and applies the rule below. alpha beta gamma delta

The rule this page applies

Each CRLF pair becomes one LF, and each remaining lone CR becomes one LF. LF already in the text is kept, and nothing else changes.

Every character other than a carriage return is copied through unchanged, including trailing spaces and blank lines.

What to Expect

Best for

  • Fixing a file that shows every line as changed
  • Pasting terminal output into a text editor

Not ideal for

  • Files that must keep CRLF for Windows tools
  • Binary data, which is not text

What this tool keeps

  • The text exactly as you pasted it
  • The same answer on every run
  • Nothing sent, stored or logged

What may need cleanup

  • A marker such as [email] or [url] that you want spelled differently
  • Spacing carried over from the text you pasted

Common errors

  • An all-whitespace input is refused, because there is nothing to normalise.
  • An empty box, which the page refuses rather than printing a blank result

Example use cases

  • Cleaning a patch before review
  • Normalising a pasted CSV

Sample input

alpha beta gamma delta

Sample output

alpha beta gamma delta

Who this is for

  • developers
  • data analysts

Frequently asked questions

What rule does this page apply?

Each CRLF pair becomes one LF, and each remaining lone CR becomes one LF. LF already in the text is kept, and nothing else changes.

What input does it refuse?

An all-whitespace input is refused, because there is nothing to normalise.

What is left unchanged?

Every character other than a carriage return is copied through unchanged, including trailing spaces and blank lines.

Is anything uploaded?

No. The text is read by JavaScript in this page and nothing is posted, stored or logged.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.