How to Convert Line Endings (LF, CRLF, CR)
Line Endings
When to Fix Line Endings
Resolve Git warnings about LF/CRLF, normalize log files from Windows servers, or prepare text for tools that require Unix line feeds. Mixed endings cause noisy diffs and parser failures.
Detected vs Converted
Output shows detected ending style and the target you select: LF for Unix/macOS, CRLF for Windows, CR for legacy Mac formats. Normalization collapses mixed endings before conversion.
Developer Tips
- Set
core.autocrlfin Git for long-term consistency - Add a .gitattributes file for cross-platform teams
- Re-run diff tools after conversion to verify clean patches
Frequently asked questions
Will this change my files on disk?
No. Copy converted output back to your editor or save manually.
Which ending should I use?
LF is standard for modern repos; CRLF when Windows-only tooling requires it.