← All text tools

Line ending converter

Convert files between CRLF (Windows), LF (Linux, macOS) and CR line endings.

  • Free
  • No sign-up
  • Works on any device

About Line ending converter

Switch a text file between CRLF (Windows), LF (Linux and macOS) and old CR line endings. Mismatched endings cause odd diffs in Git, scripts failing with errors like bad interpreter, and ^M characters in editors. Shell scripts should use LF to run on Linux.

How to use Line ending converter

  1. Add your file or paste the text.
  2. Choose the target: CRLF, LF or CR.
  3. Copy or save the converted text.

Why use this tool?

Also known as

Frequently asked questions

Why does my shell script fail with ^M errors?

The file has Windows CRLF endings, and Linux reads the carriage return as part of the command. Convert it to LF and it will run.

Which line ending should I use in a Git project?

LF is the common choice for cross-platform code. You can also set Git to handle conversion with a gitattributes file so everyone stays consistent.

How can I tell which ending my file has?

Many editors show it in the status bar as CRLF or LF. You can also convert here and compare the file sizes.

Is Line ending converter free?

Yes. Line ending converter on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put Line ending converter on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools