Free online tools

Line Ending Converter

Convert line breaks for a different editor, platform or import. Select a local UTF-8 file to count its original line endings, or paste text and choose an output format.

Enter your values

A selected text file takes precedence. Paste fields may already normalise line breaks.

Up to 512 kB. The file is read on your device.

This tool processes your input in your browser.

Result

Inspect the original text file

LF is a line feed, CR is a carriage return and CRLF is the two-character pair. Choose the original UTF-8 file to count those forms accurately, including a file that mixes them. A browser text field often converts pasted line endings to LF before a tool can inspect them.

Choose the form expected by your editor or import

Convert every LF, CRLF and CR to one chosen style. LF is common on Unix-like systems and modern macOS, while CRLF is common in Windows text formats. CR is useful for some classic Mac and legacy formats. Some tools and repositories set their own expectations.

Download the result for exact line breaks

Use the converted download to store the chosen line-ending bytes. The browser preview and clipboard may present them using the local platform’s newline behavior. The tool preserves an existing UTF-8 byte-order mark and leaves other Unicode content, including special Unicode separators, as entered.

Frequently asked questions

Will blank lines or tabs disappear?

No. The converter changes newline sequences. It preserves blank lines, tabs and leading or trailing spaces.

Does a CRLF line ending count twice?

It counts once as CRLF. A CR or LF by itself counts separately.

Can I use a binary file or a UTF-16 text file?

Use plain UTF-8 text. The browser rejects invalid UTF-8 and text containing null bytes.