Skip to main content
SiteIndex
UtilitiesReady to use

Line Ending Converter

Convert text between Unix, Windows, and Mac line endings without leaving the browser.

Guide

Interactive workspace

No account required
Line Ending Converter

Detected: 2 CRLF, 0 LF, 0 CR

3 lines · 2 line endings · 2 will change to LF

Which line ending should you use?
StyleBytesUsed by
CRLF (\r\n)2Windows / DOS, most Windows editors, CSV opened in Excel
LF (\n)1Unix, Linux, macOS, Git repositories, shell scripts
CR (\r)1Classic Mac OS (pre-OS X); rarely used today

Git settings

On Windows, git config --global core.autocrlf true converts LF to CRLF on checkout and back on commit. On macOS/Linux use core.autocrlf input (convert CRLF to LF on commit only). A committed .gitattributes file overrides per-machine settings:

* text=auto eol=lf
*.sh text eol=lf
*.bat text eol=crlf

A shell script saved with CRLF endings fails on Linux with $'\r': command not found — convert scripts to LF before running them.

How to use it

  1. Paste text and inspect the detected newline counts.
  2. Choose LF, CRLF, or CR.
  3. Enable whitespace markers to inspect separators; browser textareas normalize displayed line endings.
What is Line Ending Converter?

Convert text between Unix, Windows, and Mac line endings without leaving the browser.

How it works

SiteIndex detects and counts existing CRLF, LF, and CR line endings in your text, then converts everything to your chosen line ending style.

Common uses
  • Fix inconsistent line endings before committing a file to version control.
  • Convert a Windows text file to Unix line endings for a server.
  • Check which line ending style a pasted text block currently uses.
Limitations
  • Pasting through a textarea may normalize newlines before inspection. The text display alone does not prove on-disk byte encoding.
  • This changes newline sequences, not a file's character encoding or byte-order mark.
Frequently asked questions
Why do line endings matter?
Different operating systems and tools expect specific line endings; mismatches can cause diff noise in version control or formatting issues in some editors.

Related tools