ToolHub
Open Tool

Line Ending Converter

Convert between LF and CRLF line endings

Format Converter

About This Tool

The Line Ending Converter quickly converts text between LF (Unix/macOS) and CRLF (Windows) line ending formats. It supports automatic normalization of mixed line endings, provides a side-by-side input/output view, and displays line count statistics. All operations are performed locally in your browser β€” your text content is never uploaded to any server.

Key Features

Quick Preview

Use Cases

conversion

Frequently Asked Questions

What is the difference between LF and CRLF?

LF (Line Feed, \n) is the newline character used by Unix and macOS, while CRLF (Carriage Return + Line Feed, \r\n) is used by Windows. The difference often causes cross-platform file display issues or script execution errors.

How are files with mixed line endings handled?

The tool first normalizes all line endings (including standalone CR) to LF, then outputs according to the selected conversion direction. This ensures the output file has completely consistent line ending format.

How can I verify the conversion result is correct?

The tool uses a side-by-side layout with input on the left and output on the right, plus line count statistics below. You can visually compare the differences between input and output.

Why does Git often warn about line ending issues?

Git detects line ending formats in files and warns when a file mixes LF and CRLF, or when the format doesn't match the repository configuration. Use this tool to unify line endings before committing to resolve the issue.

Can I paste formatted content directly?

Yes. Simply paste text into the input area and the tool will automatically detect and convert the line endings. You can also click the 'Sample' button to load a sample text with mixed line endings.