CSV Line Endings
Normalise the invisible half of a CSV. Mixed \r\n and \n line breaks are what produce phantom blank rows, a stray ^M at the end of every field, and Git diffs that show every line as changed. Paste or drop a file to see exactly which endings it uses, then rewrite them consistently.
How to convert line endings
- Paste the CSV or drop the file — the status line reports how many CRLF, LF, and CR breaks it contains.
- Pick the target: LF for Unix tooling and Git, CRLF for Windows and strict RFC 4180 consumers.
- Decide whether the file should end with a newline. Many database importers want one; some diff tools complain either way.
- Copy the result or download it.
Why newlines inside quoted fields are left alone by default
A CSV field may legally contain a line break as long as it's quoted — a multi-line address, say. Those breaks are data, not record separators, so blindly replacing every \r\n can change the content of a cell. By default this tool tracks quoting and only rewrites the breaks between records. Tick the box when you genuinely want every newline in the file normalised, including inside cells.
Symptoms this fixes
- A blank row between every real row after opening a CRLF file in a tool that also treats
\ras a break. ^Mor\rstuck to the last field of each row — a CRLF file read as LF-only.- Git showing an entire file as modified when nothing changed but the endings.
- A last row that silently disappears in importers that require a trailing newline.
FAQ
Which line ending does the CSV standard require?
RFC 4180 specifies CRLF, but in practice almost everything accepts LF, and Unix tooling prefers it. Match whatever consumes the file rather than the spec.
Will this change my data?
Not with the default settings — only the bytes between records change. Enabling the in-quotes option does modify cell contents, by design.
Can I fix line endings and encoding at once?
Repair CSV normalises endings, strips the BOM, and fixes ragged rows in a single pass. For encoding specifically, see Encoding & BOM.
Privacy
100% client-side. No upload. See the privacy policy.