Newline (Line Ending) Converter

Paste text to convert line endings to LF (Unix), CRLF (Windows), or CR (old Mac). Includes automatic line ending detection and break counting.

Last updated: 2026/10/16 Developer Feedback & bug reports
Input Text
- Detected Line Ending
0 Lines
0 Breaks
Target Line Ending
Result

How to Use

1

Enter Text

Paste your text into the input field. The current line ending is detected automatically, along with line and break counts.

2

Choose Target

Select the line ending you want (LF / CRLF / CR) based on your target environment.

3

Convert & Copy

Click "Convert" to see the result, then use the "Copy" button to copy it to your clipboard.

About the Newline Converter

A web tool that converts line endings between LF, CRLF, and CR. It solves garbled text, broken layouts across operating systems, and noisy Git diffs. All processing happens in your browser, so your text is never sent to any server.

Features

  • Convert to 3 FormatsConvert to LF (Unix), CRLF (Windows), or CR (old Mac) with a single click.
  • Auto DetectionDetects the current line ending, flags mixed files, and shows line and break counts.
  • Privacy ProtectedAll processing happens in your browser. Text is never sent to servers.
  • Completely FreeNo registration, no installation. Just open and use.

Use Cases

  • Convert Windows files to LF for macOS/Linux
  • Normalize line endings in CSV and config files
  • Fix noisy Git diffs from mixed CRLF/LF
  • Fix shell script "\r: command not found" errors
  • Unify line endings in source code

FAQ

What are LF, CRLF, and CR line endings?
LF (\n) is used by Unix-like systems (macOS / Linux), CRLF (\r\n) by Windows, and CR (\r) by Classic Mac OS 9 and earlier. Because the standard differs by OS, files can display incorrectly when moved between systems.
Why does it say my line endings are "Mixed"?
It means the text contains more than one type of line ending (e.g. both LF and CRLF). This often happens with files edited in multiple environments. Converting unifies them into a single type.
What are the benefits of unifying line endings?
You avoid unnecessary Git diffs, prevent shell script execution errors, and avoid layout issues across editors and tools, reducing common development and operations problems.
Does it also convert the character encoding (e.g. UTF-8)?
No. This tool only converts line endings. It does not change the character encoding. If you need to convert encodings, use a text encoding converter tool.
Is my text sent to a server?
No. All conversion runs locally in your browser (JavaScript). Your text is never sent to or stored on any external server, so you can safely process files containing sensitive information.