Skip to content

Tools/Line endings

Line endings

Detect LF, CRLF, CR, convert them, and strip or add a UTF-8 BOM. Nothing is uploaded.

Loading tool…

How to use Line endings

  1. 1. Paste or drop a file. Detection reports LF, CRLF, CR, or mixed.
  2. 2. Pick a target ending. LF for git on Unix, CRLF for some Windows tools.
  3. 3. BOM. Strip, keep, or add U+FEFF.
  4. 4. Copy the converted text. Nothing is uploaded.

About this tool

Mixed line endings and a stray BOM still break diffs and some parsers. This tool detects LF/CRLF/CR, converts, and can strip or add a UTF-8 BOM. It does not recode Latin-1 to UTF-8.

Mixed

If more than one kind is present, detection is mixed even if one dominates.

Charset

Use Unicode Inspector for codepoints. This tool assumes the paste is already Unicode text.

Code examples

CRLF

line1\r\nline2

Frequently asked questions

Related tools

All tools