Utilities
Line endings converter
Detect and convert LF, CRLF and CR line endings.
Private Everything on these pages runs in your browser. What you type is never sent to a server and nothing is stored.
Browsers turn every line break typed or pasted into a text box into LF, so pasted text can only be LF. Choose a file to detect and convert CR and CRLF.
How to use it
- Paste your text or load the sample.
- Choose the target: LF, CRLF or CR.
- Copy the converted text, or download it.
Example
Input
line one\r\nline two\r\nResult
line one\nline two\nFrequently asked questions
What is the difference between LF and CRLF?
LF (\n) ends lines on Linux and macOS. CRLF (\r\n) is the Windows convention. Mixed endings make diffs noisy and can break shell scripts.
Why do scripts fail with ^M or bad interpreter errors?
A shell script saved with CRLF has a hidden carriage return at the end of every line. Convert it to LF.