Line Ending ConverterConvert between line endings: LF (Unix), CRLF (Windows), CR (Classic Mac).

Line Ending Converter
Convert between line endings: LF (Unix), CRLF (Windows), CR (Classic Mac).
Paste Text
Paste text with line endings to convert.
Select Target
Choose the target line ending: LF, CRLF, or CR.
Copy Result
Copy the text with converted line endings.
What Is Line Ending Converter?
The Line Ending Converter changes the line break characters in text between the three major formats: LF (\n, used by Unix/Linux/modern macOS), CRLF (\r\n, used by Windows), and CR (\r, used by Classic Mac OS). It first normalizes all line endings to LF, then converts to the selected target format. This resolves common issues when moving text or code between operating systems.
Why Use Our Line Ending Converter?
- Fix line ending issues when moving files between OS platforms
- Standardize line endings for cross-platform projects
- Convert Windows CRLF to Unix LF or vice versa
- Resolve Git and version control line ending conflicts
Common Use Cases
Cross-platform Development
Normalize line endings when collaborating across Windows, Mac, and Linux.
Git Issues
Fix line ending conflicts in version-controlled files.
File Transfer
Convert line endings after transferring files between operating systems.
Script Compatibility
Ensure shell scripts use LF line endings for Unix compatibility.
Technical Guide
The converter uses a two-step process. First, all line endings are normalized to LF (\n) by replacing CRLF (\r\n) first, then replacing any remaining CR (\r). CRLF must be replaced first to prevent creating double LF. After normalization, the tool converts LF to the target format: for CRLF, LF becomes \r\n; for CR, LF becomes \r; for LF, no further conversion is needed. This approach handles mixed line endings in the input correctly, producing consistent output regardless of the input format.
Tips & Best Practices
- 1LF (\n) is the standard for Unix, Linux, and modern macOS
- 2CRLF (\r\n) is the standard for Windows
- 3CR (\r) was used by Classic Mac OS 9 and earlier
- 4Most modern editors handle both LF and CRLF, but scripts may require specific endings
Related Tools

Whitespace Visualizer
Make invisible whitespace characters visible with symbolic markers.

Remove Extra Spaces
Remove extra whitespace — collapse multiple spaces to single spaces.

Tab to Spaces Converter
Convert tab characters to spaces with configurable tab width.

Find and Replace
Find and replace text with support for regex, case sensitivity, and bulk operations.

Word Counter
Count words, unique words, characters, and see word frequency in any text.

Character Counter
Count characters with and without spaces, plus word, line, and paragraph counts.
Frequently Asked Questions
QWhat is the difference between LF and CRLF?
QWhich format should I use?
QCan it handle mixed line endings?
QWill the output look the same?
QHow do I know which line endings my text has?
About Line Ending Converter
Line Ending Converter is a free online tool from FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration required. No ads. Just fast, reliable tools.







