Normalize Line Breaks
Standardize all line endings in your text to Unix (LF), Windows (CRLF), or old Mac (CR) format — essential when moving files between operating systems.
What Does This Tool Do?
Different operating systems use different characters to mark the end of a line: Unix/Linux/macOS uses just a line feed (\n), Windows uses carriage return + line feed (\r\n), and old classic Mac OS used just carriage return (\r). When files move between systems these get mixed up, causing display issues. This tool converts all line endings to a consistent format.
Key Features
How to Use This Tool
- Paste your text with inconsistent or mixed line endings.
- Choose the target format (Unix LF, Windows CRLF, or Mac CR).
- Click Normalize to standardize all line endings.
How It Works
All existing line ending variants (\r\n, \r, \n) are first normalized to \n. Then the result is converted to the target format: left as \n for Unix, replaced with \r\n for Windows, or replaced with \r for old Mac.
Common Use Cases
Frequently Asked Questions
What is the difference between LF and CRLF?
LF (\n, line feed) is used by Unix, Linux, and modern macOS. CRLF (\r\n, carriage return + line feed) is used by Windows. The extra \r can cause issues when Windows files are used on Unix systems.
Why does Windows use CRLF?
A historical convention from typewriter terminology — carriage return moved the print head to the left margin, and line feed moved paper up. DOS/Windows kept both characters while Unix simplified to just line feed.
Related Tools
Link to This Tool
Copy and paste the code below to link to this tool from your website: