How to Convert CSV Line Endings From CRLF to LF
Need Unix LF line endings for scripts or Git-friendly exports? Learn how CRLF and LF differ and how to save CSV files deliberately.
Line endings are invisible until they break something. A CSV exported on Windows often uses CRLF. A script on Linux may expect LF. A Git diff may show every row changed even though the data is the same.
If the file is going into a pipeline, convert line endings deliberately instead of letting whichever app last touched the CSV decide.
CRLF vs LF in plain terms
Line endings mark where one row ends and the next begins.
- CRLF means carriage return plus line feed: common in Windows files.
- LF means line feed only: common in Unix, Linux, and modern macOS tooling.
Both can be valid. The right choice depends on the system that will read the file.
Why conversion should be explicit
Some apps rewrite line endings on save without asking. That can be noisy or harmful:
- Git diffs show every row changed.
- Linux scripts see unexpected carriage returns.
- Windows tools may reject LF-only files.
- Downstream imports may behave inconsistently.
There is more background in CSV line endings explained.
Convert with Save As
CEESVEE lets you choose line endings during Save or Save As, alongside delimiter, encoding, quoting, and BOM options.
To convert CRLF to LF:
- Open the CSV.
- Confirm the delimiter and encoding are correct.
- Choose Save As.
- Select LF for line endings.
- Save a new copy and use that in the Linux or Git workflow.
The same process works in reverse when a Windows-only tool expects CRLF.
Watch out for embedded line breaks
Some CSV fields legitimately contain line breaks inside quoted values. Do not use a naive "replace every CRLF" operation unless you understand the file structure. A CSV-aware editor can parse rows while respecting quotes.
The bottom line
Line endings are part of a faithful CSV round-trip. Choose LF or CRLF intentionally, especially when files move between Windows, Linux, scripts, and version control.
Download CEESVEE for free and save CSV line endings on purpose.
Frequently asked questions
What is the difference between CRLF and LF?
CRLF uses carriage return plus line feed, common on Windows. LF uses only line feed, common on Unix, Linux, and macOS tooling.
Can line endings break a CSV?
They can confuse scripts, diffs, or downstream systems if the expected convention is different. Quoted embedded line breaks add another reason to use a real CSV parser.
Can CEESVEE choose CSV line endings on export?
Yes. Save and Save As expose line-ending choices, so you can write LF or CRLF deliberately.