Skip to content
migration.tools
CRLF to LF

Line ending converter (CRLF ↔ LF)

A shell script edited on Windows fails on Linux with “bad interpreter: ^M”. A CSV with mixed endings imports with phantom blank rows. Normalise every line ending in one pass — dos2unix without installing anything.

Options

Text

Converted text

The result appears here as soon as there is input.

Processed on this device. Nothing you paste or drop is uploaded.

How to use it

  1. 1Paste your CRLF or drop a file onto the input panel.
  2. 2Adjust the options — the result updates as you type.
  3. 3Copy the LF or download it. Drop several files to convert a batch into one ZIP.

When line endings bite

Moving files from Windows hosting to a Linux server is the classic case: shell scripts, cron files, .env files and .htaccess files with CRLF endings misbehave in ways that are hard to spot, because the extra carriage return is invisible.

The tool counts each kind of ending it found, so mixed files — usually the result of several people editing on different systems — are obvious.

Questions

Which should I choose?

LF for anything that runs on Linux, macOS, containers or CI. CRLF only for files consumed by Windows-only tools, such as .bat scripts.

Guides that use this tool