Line Ending Converter (LF / CRLF / CR)
Detects the line endings (LF, CRLF, or CR) in your text and converts them all to the type you choose. Handy for fixing mixed line endings after exchanging files between Windows and macOS/Linux, or for keeping unrelated line-ending changes out of a Git diff. To check the number of lines or characters, also try the Character Counter tool.
🔒 Runs in your browser · Your data is never sent to a server
You can also drag and drop a file here
Note: browsers always normalize line endings to LF for text typed or pasted into this field. To accurately detect and convert an existing file's line endings, use "Load a file" above instead.
Notes
- Browser <textarea> fields always normalize pasted or typed line endings to LF. To accurately detect and convert an existing file's line endings, use "Load a file" instead of typing directly.
- The file saved via "Download as file" contains exactly the line ending you chose. If you paste the copied result into another text editor or app instead, that app or OS may still convert the line endings on its own.
- Loaded files are read as UTF-8. Files in another encoding, such as Shift-JIS, may appear garbled.
- All processing happens in your browser — the file or text you load is never sent to a server.
Glossary
LF (line ending)
Short for Line Feed, the "\n" control character used to represent a newline. The standard on macOS and Linux.
CRLF (line ending)
Short for Carriage Return + Line Feed, the two-character sequence "\r\n" used to represent a newline. The standard on Windows, and a common source of mixed line endings when exchanging text files across operating systems.
CR (line ending)
Short for Carriage Return, the single "\r" character used to represent a newline. Used by classic Mac OS (up to version 9) but rarely seen today.
FAQ
Which systems use LF, CRLF and CR?
LF is used on Linux and macOS, CRLF on Windows, and CR by classic Mac OS. Mixed endings cause noisy Git diffs, so it is safer to standardize.
Why can't it detect the line endings of pasted text?
Browsers normalize line breaks in text fields to LF. To detect and convert the endings of an existing file accurately, load it with the file input.
Can I convert Shift_JIS files?
Loaded files are read as UTF-8, so Shift_JIS files may be garbled. Convert the character encoding first with the encoding converter.
Share this page
