Line Ending Converter
Convert line endings between LF (Unix), CRLF (Windows) and CR, and see how many of each the text contained. Fixes ^M characters and mixed endings. Free.
Runs in your browser. Nothing is uploaded.
About Line Ending Converter
Windows ends lines with CRLF (\r\n), while Linux and macOS use LF (\n). Mixing them causes stray ^M characters, failing shell scripts ("bad interpreter") and noisy Git diffs. This converter counts each kind of line ending in your text and normalises them all to the one you choose.
Open a file or paste text, convert, then download or copy the result.
How to use Line Ending Converter
- Type or paste your text into the input box. Press Sample to see an example.
- Adjust the options. The result updates as you type.
- Copy the result, or press Use as input to chain another transformation.
Frequently asked questions
Why does my bash script fail with \r errors?
It was saved with Windows CRLF endings, so bash sees a carriage return at the end of each line. Convert it to LF.
How do I stop Git changing line endings?
Add a .gitattributes file, for example * text=auto eol=lf, so everyone's checkout uses the same endings.
Is Line Ending Converter free and private?
Yes. Line Ending Converter is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.