Ctrl + K
HomeEncoding ToolsLine Ending Converter
Free Developer Tool

Line Ending Converter

Convert text line endings between Windows CRLF, Unix LF and classic Mac CR formats.

Input
Line Ending
Detection
Detected formatCRLF (Windows)
LF0
CRLF3
CR0
Total line endings3
Lines3
Converted Text
Result Information
Target formatLF (Unix / Linux / macOS)
Line ending sequence\n
Converted line endings3
Converted lines3
Line Ending Reference
FormatEscapeCommon usage
LF\nUnix, Linux, modern macOS
CRLF\r\nWindows
CR\rClassic Mac OS
Notes
• LF is represented by \n.
• CRLF is represented by \r\n.
• CR is represented by \r.
• Mixed line endings are detected instead of being incorrectly classified as one format.
• Conversion first normalizes all recognized endings to LF and then applies the selected format.
• The original input is not modified.
• Everything is processed locally in the browser.

What is Line Ending Converter?

Detect and convert line endings between LF, CRLF and CR formats to keep text consistent across operating systems, editors and development environments.

How to use

  1. Paste or enter the text you want to analyze.
  2. Review the detected line ending format and line ending statistics.
  3. Select the target line ending format.
  4. Copy the converted text.

Features

  • Automatic line ending detection
  • LF, CRLF and CR conversion
  • Mixed line ending detection
  • Line ending statistics
  • Line count analysis
  • In-browser processing

Common Use Cases

  • Cross-platform development
  • Git and source code cleanup
  • Text file normalization
  • Configuration files
  • Legacy text file conversion

Example

Input
First line
Second line
Third line
Output
First line
Second line
Third line

FAQ

Can it detect mixed line endings?

Yes. The tool detects whether the input contains LF, CRLF, CR or a mixture of multiple line ending formats.

Does it change the text content?

No. The conversion only changes line ending characters. The actual text content remains unchanged.

How does it count lines?

The tool counts text lines separately from line ending characters. A trailing line ending does not create an additional empty line in the displayed line count.