Harmonize newline characters between Windows (CRLF), Unix/macOS (LF), and legacy Mac (CR)
Switch between Windows CRLF and Linux LF line breaks across your files.
🛡️ Your rows never leave your browser.
Why Onfyt: Detects and eliminates orphaned carriage returns (\r) attached to the end of cells without disturbing multiline quoted text.
Interactive Sample Data
| id | server_name | os |
|---|---|---|
| 1 | prod-web-01 | Ubuntu Linux |
| 2 | db-primary | Debian |
| 3 | win-dc-01 | Windows Server |
How this tool works
Windows text files terminate each line with two characters: Carriage Return (0x0D) followed by Line Feed (0x0A), written as \r\n. Unix, Linux, and macOS use only the Line Feed (0x0A), written as \n. Classic Mac OS 9 used only the Carriage Return (0x0D). Transfer a Windows-originated CSV to a Linux server and every row in the file ends with a stray \r that gets silently appended to the last field value—a date cell reads "2024-10-15\r" instead of "2024-10-15", breaking date parsing. These differences cause subtle and frustrating failures across development and data engineering workflows. Bash scripts saved with CRLF fail on Linux with errors like '^M: command not found'. Git commits show entire files modified with whitespace changes because line ending conventions clashed. Furthermore, CSV parsers can fail to detect row terminations or leave phantom '\r' carriage returns attached to the final column in a row. DataFix scans your file, reports the current count of CRLF, LF, and CR terminators, and converts the entire document into your chosen convention. Converting carriage-return line feeds to single line feeds ensures shell scripts execute without bad-interpreter errors on Linux hosts.
Things that usually go wrong
- Mixed line endings in a single file are normalised to the target format.
- BOM markers are not affected — use the BOM Removal tool if needed.
Edge cases we tested
🧪 Mixed line endings in a single file
Unifies all line breaks to the selected target format.
🧪 Multiline cells enclosed in quotes
Internal cell newlines converted along with row terminators while maintaining RFC 4180 quotes.
🧪 Lone Carriage Returns (\r legacy Mac)
Detected and transformed into standard LF or CRLF.
Frequently Asked Questions
How can I tell what line endings my file has?
Open it in a hex editor or use 'cat -A' in a terminal. Windows CRLF appears as ^M at the end of each line.
Does this affect CSV parsing?
Yes. Some parsers treat \r as a stray character inside values when fed a CRLF file on Unix.
Related tools
Transform
Column to Comma-Separated List
Extract a CSV column and convert it to a comma-separated list for SQL IN clauses or code arrays.
Open Tool →
Transform
Comma-Separated List to Column
Convert a comma-separated, line-separated, or SQL IN list into a single-column CSV.
Open Tool →
Transform
Lines to CSV
Convert plain-text newline-delimited records into structured CSV tables.
Open Tool →