How to use the Line Ending Converter
- Paste text or drop one or more files.
- Read which line endings were found — mixed files are flagged.
- Pick LF or CRLF, optional cleanups, and copy or download the converted text or ZIP.
CRLF vs LF
Text files end each line with an invisible character. Unix, Linux and macOS use LF (\n, line feed). Windows uses CRLF (\r\n, carriage return + line feed). Classic Mac OS used a lone CR. Most editors handle both, but many tools don’t: a shell script with CRLF fails with /bin/bash^M: bad interpreter, Docker entrypoints break, and diffs show every line as changed.
Fixing it for good in Git
Add a .gitattributes file with * text=auto eol=lf (and *.bat text eol=crlf for Windows batch files) so Git normalises endings on commit. Setting git config --global core.autocrlf input on macOS/Linux and true on Windows also helps. After adding .gitattributes, run git add --renormalize . once.
Mixed line endings
Files edited on different systems often contain both kinds. The counters show exactly how many of each the text contains, and converting makes them uniform.
Private by design
Text and files are converted in your browser and never uploaded.
Tools that pair well with the Line Ending Converter
- Windows Path Converter — Paste a path in any format — C:\Users\me\project, /mnt/c/Users/me/project, /c/Users/me — and get it in every other form, ready to copy: WSL, Git Bash, Cygwin, file URL, UNC and escaped for code.
- Remove Line Breaks — Paste text with broken lines — from a PDF, an email or a terminal — and join it back into clean paragraphs.
- .editorconfig Generator — Make every editor on your team use the same indentation, line endings and charset.
- .gitignore Generator — Tick your stack — Node, Python, React, Next.js, Docker, macOS, VS Code and 40 more — and get one clean, de-duplicated .gitignore with commented sections, ready to download.
Frequently asked questions
How do I fix “bad interpreter: /bin/bash^M”?
sed -i 's/\r$//' script.sh — and save it again.