Skip to main content
Free File Converter

Convert text file line endings

Switch a plain-text file between Windows (CRLF), Unix (LF), and classic Mac (CR) line endings.

Processed in your browser. This file is converted on your device and is never uploaded.

Converter

Input

.txt up to 25 MB. You can also drag a file here.

Options
Target line ending

No file selected.

About this tool

Text files mark the end of a line differently depending on the system that wrote them. Windows tools normally write a carriage return followed by a line feed (CRLF), Unix and macOS tools write a single line feed (LF), and very old Mac software wrote a single carriage return (CR).

Mixing these conventions causes files to appear as one long line in some editors, produces noisy diffs in version control, and can break scripts that expect a specific ending. This tool rewrites every line break in a text file to the convention you choose.

Supported formats and limits

Input
.txt
Output
.txt (text/plain)
Output name
The original name with the chosen line ending appended, for example notes.txt becomes notes-lf.txt.
File size limit
25 MB
Processing
In your browser. The file is not uploaded.

How to use it

  1. Choose a .txt file, or drag one onto the file area.
  2. Select the line ending you want: Unix (LF), Windows (CRLF), or classic Mac (CR).
  3. Select Convert.
  4. Download the converted file. The original file on your device is not changed.

Limitations

  • Only plain-text files are supported. A file containing binary data is rejected rather than corrupted.
  • The file is read as UTF-8. Text saved in a different encoding, such as UTF-16 or a legacy code page, may not convert correctly.
  • A byte order mark at the start of the file is preserved as-is.
  • Line endings inside quoted strings or code are rewritten too, because the tool works on the whole file rather than parsing its contents.
  • One file is converted at a time.

Frequently asked questions

Is my file uploaded anywhere?
No. The conversion runs entirely in your browser using standard web APIs. The file never leaves your device, and no request carrying its contents is made.
Which line ending should I choose?
Use LF for Unix, Linux, macOS, and most version-control workflows. Use CRLF for Windows tools that require it, such as some Windows editors and older batch scripts. CR is only needed for software written for Mac OS 9 and earlier.
What happens to a file that already mixes line endings?
Every break is normalized to your chosen ending, so a file with a mix of CRLF and LF becomes consistent.
Does the file size change?
Yes, slightly. Converting from LF to CRLF adds one byte per line, and converting from CRLF to LF removes one byte per line.
Can I convert several files at once?
Not with this tool. Convert one file, reset, and then choose the next one.