#495 · Developer Tool

Line Ending Converter

Normalize mixed line endings to LF, CRLF, or standalone CR while leaving the text itself unchanged. The converter counts each source style separately and can preserve whether the input ended with a newline. It is handy for repository cleanup, shell scripts, generated CSV files, and transfers between Windows and Unix tooling.

Developer Input

Line Ending Converter
Ad space

How to use this developer tool

  1. Paste or upload the text to normalize.
  2. Select LF, CRLF, or CR as the target.
  3. Choose whether to preserve the final newline state.
  4. Convert, inspect the counts, then download the normalized file.

What this developer tool does

The output contains the same logical lines joined using one selected line-ending sequence.

Count CRLF first, then standalone CR and LF, split with a three-style expression, and rejoin with the selected sequence.

The visual output may look identical even though its bytes have changed.

Example

Input endings: CRLF + LF
Target: LF
Result: every break is 0A

Use cases

  • Enforce repository line-ending policy.
  • Fix shell scripts copied from Windows.
  • Normalize CSV exports before comparison.

Tips for reliable output

  • Follow the project .gitattributes file.
  • Preserve the final newline for source files.
  • Use reported counts to confirm mixed input.
  • Avoid converting binary files.

Processing details

CRLF is recognized as one sequence before standalone carriage returns and line feeds are counted. No trimming or whitespace normalization is performed.

Textarea display does not reveal control characters. Download or inspect byte counts when exact verification is required.

Frequently asked questions

Does the converter change text other than line endings?

No. It normalizes CRLF, LF, or CR sequences and preserves the other characters.

Which line ending should a Git repository use?

LF is common for cross-platform source repositories, but follow the project .gitattributes and tooling rules.

Can it preserve whether the final line has a newline?

Yes. Enable the preserve option to retain that aspect of the input.

Why does the displayed text look unchanged?

Textarea rendering hides the difference between CRLF and LF. Use the reported counts or download the result.

Will mixed line endings be detected?

Yes. The statistics count CRLF, standalone LF, and standalone CR sequences separately.

Output fields

FieldMeaning
SummaryHigh-level processing result
StatisticsCounts and validation details
ExportCopy-ready text plus structured data when available