text-henkan

Line Ending Converter (CRLF / LF / CR)

Paste text or load a file and the tool reports which line endings it uses — including mixed files. Choose a target and convert everything in one pass.

or choose a file

The three conventions

CRLF (\r\n) is used by Windows, email and HTTP. LF (\n) is used by Linux, macOS, Git and most programming toolchains. CR (\r) alone dates from Mac OS 9. In practice only the CRLF/LF split still causes trouble.

Symptoms of the wrong line ending

A shell script written on Windows failing with "bad interpreter: /bin/bash^M", a Git diff showing every line as changed, or a file that appears to be one very long line — all point at mismatched line endings.

Mixed files

The tool counts CRLF, LF and CR separately and flags the file as mixed when more than one appears. Conversion replaces all of them at once, so a mixed file becomes consistent in a single step.

Frequently asked questions

Which line ending should I pick?

LF for source code, Git repositories and anything destined for a Linux server; CRLF for files opened by Windows Notepad or older Windows applications. When in doubt, LF is the safer default.

Is a trailing newline added?

No. Whatever the input had is preserved — a file without a final newline stays that way.

Does this change the character encoding?

No. Downloads are written as UTF-8; use the encoding converter if you need a different one.

Can I verify the result?

Yes — detection runs again on the output and the resulting line ending and line count are shown below the result.

Related tools

Full-width ⇄ half-widthCharacter counterDedupe / sort linesUnicode normalizerShift_JIS → UTF-8UTF-8 → Shift_JISEUC-JP → UTF-8UTF-8 → EUC-JP