Toolstia / Line ending converter

line ending converter

Fix files that show strange line breaks. Paste text, see which line endings it contains and convert them all to LF, CRLF or CR.

Copying keeps the line endings you chose. Some editors and chat boxes may change them again when you paste, so check the result in your own editor. CRLF is carriage return plus line feed, as used by Windows.

How it works

  1. Paste your text.
  2. Choose the line ending you want.
  3. Copy the converted text.

What they are

Windows ends lines with a carriage return and a line feed (CRLF). Linux, macOS and the web use a line feed only (LF). Very old Mac systems used a carriage return (CR).

Mixed endings

Files edited on several systems can mix them. The tool counts each kind and makes them all the same.

Preview

A preview with visible marks shows exactly where each line ends.

Extras

Optionally remove trailing spaces and make sure the file ends with one line break, which many tools expect.

Questions

Why do my scripts fail with ^M errors?

A shell script saved with CRLF endings can break on Linux. Convert it to LF.

Does pasting keep the endings?

Copying keeps them, but some editors and pages may change them when you paste. Check in your editor.

Is my text stored?

Everything happens in your browser, and nothing you enter is sent anywhere.