Line Ending Converter
How to Use
📖 Tool Introduction
Line Ending Converter is a practical tool for the everyday pain of incompatible end-of-line styles across operating systems. Windows, Linux and macOS, together with legacy Mac systems, use three different newline characters: Windows writes a carriage-return plus line-feed pair known as CRLF, Unix-family systems use a bare line-feed called LF, and the now-rare old Mac classic used a carriage return alone, CR. When you paste a draft that was edited on Windows into a Linux shell script, a config file or a version control system, you routinely run into cryptic errors, stray ^M symbols, or git warnings that line endings are about to be rewritten automatically. The moment you paste text in, this tool counts exactly how many CRLF, LF and CR endings are present, so you can see the true state of the file at a glance; then you simply pick one of the three target styles, LF, CRLF or CR, and the whole document is normalized to a single consistent ending. The conversion uses a two-step strategy: every CRLF and every isolated CR is first reduced to a plain LF, and only then mapped onto the chosen target, which avoids the half-broken endings that naive one-pass replacements can produce. The result can be copied immediately or downloaded as a clean text file, and every calculation happens locally in the browser. For programmers, ops engineers and anyone who moves text between platforms, this is a lightweight, always-handy companion that removes a whole class of silent line-ending bugs before they ever reach a build or a diff. Because the detection badges refresh live as you type, you can confirm the mix before committing to a conversion, and the output preserves the body text and indentation exactly while only the trailing control characters change. Because no data leaves your machine, you can safely normalize configuration files, CSV exports and commit messages without any privacy concern at all.
✨ Key Features
- Auto-detect: counts CRLF, LF and CR the moment you paste text
- Three targets: unify everything to LF, CRLF or CR in one click
- Two-step normalization: reduce to LF first, then map, avoiding broken endings
- Live badges: detection counts refresh as you type
- Private by design: runs in the browser with zero uploads
- Zero setup: no sign-up or install, on desktop and mobile
📝 How to Use
- Paste text from a cross-platform source into the input area
- Read the top badges to see how many of each ending exist
- Pick the target style you want: LF, CRLF or CR
- Click Convert and inspect the unified text in the output
- Copy the result or download it as a .txt file
⚠️ Notes
- Counting rule: CRLF counts as one pair; lone CR and LF are counted separately without overlap
- Target choice: use LF for the web and modern cross-platform projects, CRLF for Windows-only scripts
- CR is rare: pure CR endings are a legacy of old Macs and rarely needed today
- Content kept: only the trailing characters change; the words and indentation stay intact
- Source safe: output never touches the input, so you can reconvert freely