Free cross-platform text tool

Line Ending Converter

Detect whether your text uses CRLF, LF or CR line breaks, then convert it to Windows, Unix/macOS or classic Mac format and download the exact bytes.

No text yet
0 CRLF0 LF0 CR

Your text

Paste or type below

Converted result

Choose a target above

Detect and fix line endings across platforms

Accurate detection

Reads pasted content before the browser can normalize it, so CRLF, LF and CR are counted precisely.

Three target formats

Convert to CRLF for Windows, LF for Unix and macOS, or CR for legacy classic Mac files.

True byte-accurate download

The downloaded .txt file contains the exact line-ending bytes you chose, not a browser-normalized version.

How to convert line endings

  1. Paste your textDrop in text or code from any source; the current line-ending style is detected automatically.
  2. Pick a targetSelect Convert to CRLF, LF or CR depending on your destination platform.
  3. Copy or downloadGrab the result from the output box or download it as a byte-accurate .txt file.

Why line endings differ between operating systems

Every text line has to end somehow, but the exact bytes used to mark that ending were never fully standardized across computing history. Windows inherited the CRLF convention, a carriage return followed by a line feed, from early teletype and DOS systems. Unix and, later, macOS settled on a single LF character, which is simpler and takes up less space. Classic Mac OS, before OS X, used a lone CR instead, a quirk that still occasionally shows up in very old files. These differences are mostly invisible until they cause a problem: a script with the wrong line endings can fail to run, a git diff can show every single line as changed because the endings flipped, and some parsers or command-line tools choke on an unexpected CR character. Converting a file's line endings to match its destination environment, whether that is a Windows batch script, a Unix shell script, or a config file consumed by a specific tool, resolves these issues without altering the actual text content. This tool detects the current format, shows exact counts, and lets you convert to any of the three standard formats before downloading the byte-accurate result.

CRLF

Carriage return + line feed. The default on Windows and used by many Windows-authored files.

LF

A single line feed. The standard on Linux, macOS, and most modern command-line tools.

CR

A lone carriage return. Used historically by classic Mac OS before OS X.

Line ending converter FAQ

What is the difference between CRLF, LF and CR?

CRLF (carriage return plus line feed) is the Windows line ending, LF (line feed alone) is used by Unix, Linux and macOS, and CR (carriage return alone) was used by classic Mac OS before OS X. They all mark the end of a line but use different byte sequences.

How does this tool detect my current line endings?

It reads the raw pasted text before your browser can normalize it, counts CRLF pairs, lone LF characters and lone CR characters, and reports which style is used or flags the file as mixed.

Why would I need to convert line endings?

Some tools, version control diffs, and cross-platform scripts are sensitive to line-ending style. Converting a file to the format your target system expects avoids unexpected diffs or parsing errors.

Does the downloaded file really use the exact line endings I chose?

Yes. The download is built directly from the converted text as raw bytes, so it is not re-normalized by the browser and matches the CRLF, LF or CR format you selected.

Is this line ending converter free and private?

Yes. Conversion happens entirely in your browser with no account or upload required.

Try other text tools