Line Ending Converter
See which line endings a text uses and convert them to Unix (LF), Windows (CRLF) or classic Mac (CR) style.
Processed on your device. Files are not uploaded
How to change line endings
Paste text or choose a file
A file keeps its true line endings.
Choose the new ending
LF, CRLF or CR.
Download the result
Or copy the text.
Worked example
This is what Line Ending Converter gives for its own sample values. Open the tool above and change anything to try your own.
Text
first line second line third line
- Convert to
- LF: Linux, macOS (\n)
Result
- LF (Unix) found
- 2
- CRLF (Windows) found
- 0
- CR (old Mac) found
- 0
About Line Ending Converter
See which line endings a file uses and convert them: LF for Linux and macOS, CRLF for Windows, CR for very old Macs. Mixed endings are fixed to one style, which stops noisy diffs in Git.
FAQs
Why does pasted text always show LF?
Browsers normalise line breaks in text boxes. Choose the file itself to read the real endings.
Which should I use?
LF for almost everything. Windows-only scripts and tools may need CRLF.
Can I set this for a project?
Use .editorconfig Generator.