Line Endings & BOM Converter
Counts CRLF, lone CR, and lone LF separately before normalising, so you can spot files that mix conventions (a common cause of dirty git diffs or Bash scripts that fail on Windows). Output bytes are reported with the BOM included, so you know exactly what will land on disk. All processing is local in your browser.
- LF count1
- CRLF count1
- Lone CR count0
- Total lines3
- Output bytes (UTF-8)28
- Had BOMNo
Mixed-ending files usually mean the source was edited across platforms — normalising fixes most "why does my diff explode" headaches.
How to use
- Paste text or drag a file's contents into the input.
- Pick the target line ending (LF for Unix/macOS, CRLF for Windows, CR for legacy Mac).
- Choose the BOM policy and copy the output.
Frequently asked questions
- When should I keep the BOM?
- Some legacy Windows tools and a few Excel CSV imports rely on it. For everything else (especially shell scripts, JSON, and source code in modern build chains), strip it.
- What's a mixed-ending file?
- Any file that contains more than one of LF/CRLF/CR. Common when text gets edited across platforms or when generators concatenate fragments from different sources. Normalising to a single style makes git diffs and downstream parsers behave.
- Why does git show my whole file as changed?
- Because every line differs: the file was committed with one line ending and saved with another, so there is no unchanged line left to anchor the diff. Normalise once, commit that, and set the repository's line-ending policy so the conversion is not reapplied on the next checkout.
- Does the last line need a newline at the end?
- For most Unix tooling, yes — a line is considered terminated by its newline, which is why diffs call out "No newline at end of file" and why concatenating two files without it glues the last line of one to the first line of the next. It is a separate question from which ending style you use.
Related tools
File Encoding Detector
Upload any text file and detect its encoding — UTF-8, UTF-16 LE/BE, UTF-32, Latin-1, ASCII — with BOM detection, byte signal analysis, and a hex preview.
Text Encoding Converter
Open text files in legacy encodings (EUC-KR, Shift_JIS, Windows-1252…) as readable UTF-8.
CSV ↔ JSON Converter
Convert CSV to JSON and JSON back to CSV, with a delimiter option.
Excel (XLSX) to CSV, JSON & Markdown
Open an .xlsx workbook in the browser and export any sheet as CSV, JSON or a Markdown table — the file never leaves your device.
CSV to Excel (XLSX) Converter
Turn CSV or TSV into a real .xlsx file in your browser, with leading zeros, long IDs and codes like SEPT1 kept exactly as typed.
Image → PDF Converter
Combine multiple JPG / PNG images into a single PDF with adjustable page size, orientation, and fit.