Tool guide
About this tool.
- Text files end lines with different invisible terminators: LF on Unix and macOS, CRLF on Windows and CR on very old Mac systems. A file can also start with a byte order mark (BOM, U+FEFF), a marker some Windows tools write at the start of UTF-8 text.
- This tool counts every kind of terminator, converts them all to the one you choose and adds or removes the BOM. Everything runs locally in your browser or editor.
- Normalize a file edited on several systems so Git stops showing whole-file diffs.
- Convert LF to CRLF for scripts and CSV files that Windows tools expect.
- Add a BOM so Excel opens a UTF-8 CSV with the right encoding, or remove one that breaks a shebang line or JSON parser.
- Check a sample with Keep selected to see how many LF, CRLF and CR terminators it contains.
Paste text or choose a sample, then pick the line ending and the BOM action.
LF, CRLF and CR rewrite every terminator in the text to the chosen kind. Keep leaves terminators untouched and only reports the counts.
BOM Keep leaves the start of the text as it is. Add puts U+FEFF at the start unless one is already there, and Remove drops it.
The summary lists the LF, CRLF and CR counts, tells whether the endings are mixed, whether a BOM was present and whether the text changed.
Copy the result, insert it into the editor, or save converted.txt.
- Mixed to LF: a, CRLF, b, CR, c, LF → a, b, c each ending in LF.
- LF to CRLF: first\nsecond → first\r\nsecond.
- Add BOM: name,city → U+FEFF followed by name,city.
- Remove BOM: U+FEFF followed by x → x.
- Report only: Keep line endings and Keep BOM show the counts and leave the text identical.
- Input is limited to 1,000,000 UTF-16 units; larger input is rejected with a message naming the limit.
- Untouched samples and VS Code source drafts retain raw terminators. Edited browser textareas normalize newlines to LF, so the converted.txt download is the exact result.
- Only CRLF, CR and LF are line terminators here. Unicode separators such as U+2028, U+2029 and U+0085 are left unchanged.
- The mixed flag is set when more than one kind of terminator has a non-zero count.
- In VS Code, Replace and Insert adopt the document's end-of-line setting. Use the converted.txt download for exact bytes, or change the EOL in the status bar.