Change line endings
Convert text files between Windows (CRLF) and Unix or macOS (LF) line endings, several at a time.
or drop them here · files stay on your device
We count formats and sizes. Filenames stay private unless you opt in.
- Runs on your device
- No sign-up or watermark
- No fixed file size cap
The short answer
To convert CRLF to LF, choose one or more text files, set Convert to LF (Unix, macOS) and run it. Every line break, including mixed ones and old Mac CR, is normalised first, then written in the style you picked. It runs in your browser, so nothing is uploaded. Choose CRLF for the reverse.
How to convert Windows line endings to Unix
- STEP 1
Choose text files
Select one or more .txt, .csv, .json, .md or other text files. They are read on your device.
- STEP 2
Pick the target
In Convert to, choose LF (Unix, macOS) or CRLF (Windows).
- STEP 3
Convert line endings
The report shows how many files changed; files already in that style are listed as unchanged.
- STEP 4
Download the files
Each file saves as name-eol with its own extension. Several come back together in a ZIP.
CRLF, LF and why they cause trouble
Text files end each line with an invisible marker. Windows uses two characters, carriage return and line feed (CRLF, \r\n). Linux and modern macOS use a line feed alone (LF, \n). Classic Mac OS used a carriage return alone (CR).
Mixing them causes real faults: shell scripts with CRLF fail with "bad interpreter" errors on Linux, git diffs show every line as changed, and some CSV importers see blank rows. Normalising the endings fixes all of these without touching the text itself.
What survives, and what does not
Each file is read as UTF-8 text. Every CRLF, lone CR and LF is first turned into LF, so files with mixed endings are cleaned in one pass, and then converted to CRLF if you chose Windows. The report counts how many files actually changed. Outputs keep their original extension with -eol added to the name.
What you keep
Every character of text, only line breaks change
The file extension, so a .csv stays a .csv
Files with mixed endings, normalised to one style
What you lose
There is no option to write classic Mac CR endings; CR input is read but output is LF or CRLF
A UTF-8 byte order mark at the start of the file is dropped
Files in encodings other than UTF-8, such as Windows-1252, can have accented characters damaged
Honest limits are published on every tool page. If a tool cannot do something well, it says so here rather than letting you find out after the download.
Change line endings at a glance
| Input | Text files: TXT, CSV, JSON, MD and other text/* types |
|---|---|
| Output | Same format, with LF or CRLF endings |
| Reads | CRLF, LF, CR and mixed |
| Batch | Yes, several files at once |
| Runs on | Your device, in the browser |
| Works offline | After the first use |
If something goes wrong
It says the file looks like a binary file
The tool found a NUL byte, which plain text does not contain. Word documents, spreadsheets and UTF-16 files are not plain UTF-8 text; save them as UTF-8 text first.
It reports 0 files changed
The files already use the endings you picked. Nothing is wrong; you can use the originals as they are.
My shell script still fails after converting
Check that you chose LF, and that your editor is not converting back on save. A .gitattributes rule such as *.sh text eol=lf keeps git from doing it either.
Change line endings questions
How do I convert CRLF to LF?
Choose the files, set Convert to LF (Unix, macOS) and run it. Every Windows line break becomes a single line feed.
How do I convert LF to CRLF for Windows?
Pick CRLF (Windows) instead. Use it for batch files or tools such as older Notepad versions that expect Windows endings.
What does the bad interpreter error with ^M mean?
The script was saved with CRLF endings, so Linux reads the carriage return as part of the interpreter path. Converting the script to LF fixes it.
Can I fix line endings without installing dos2unix?
Yes. This does the same job in a browser on Windows, macOS or Linux, for several files at once, with nothing to install.
Does it handle files with mixed line endings?
Yes. All CRLF, CR and LF breaks are normalised first, so a file with a mix ends up consistent.
Are my files uploaded?
No. They are read and rewritten in your browser tab, then saved back to your device.