All Tools View Categories Blog About Contact Privacy
✦ CompressPrivate
Compress Anything.
Images · PDF · Video · Audio · Docs
🔒 100% Private ⚡ Free Forever ☁️ No Uploads
Compress Free →

Line Ending Checker

Detect CRLF vs LF vs legacy CR endings, and whether a file is mixed.

Runs entirely in your browser — your logs never leave this page.
CRLF 0 LF 0 Legacy CR 0

  

About Line Ending Checker

Line endings are invisible until they break something. A file that looks perfect in an editor can be LF on its first half and CRLF on its second, or carry stray lone \r bytes left over from an old Mac export or a broken transfer, so every parsed line ends in a phantom carriage return that shows up as a stray ^M or a mangled character. Line Ending Checker reads the raw bytes of a pasted log and reports, per terminator, exactly how many lines end in CRLF (\r\n), bare LF (\n), or legacy CR (\r alone, the old Mac OS 9 style), which style dominates, and whether the file is mixed.

The counting is exact, not a guess based on the first few lines. Every “\r\n” pair is counted once as CRLF, and any remaining lone \r — including runs of several lone CRs back to back, the kind an old export or a corrupted transfer can leave behind — is counted individually rather than collapsed into a single hit. A file can carry CRLF for most of its lines and still have a handful of stray CR-only breaks buried in the middle, and a checker that only samples the first line will miss that entirely. This tool inspects every byte, so a single outlier terminator standing between thousands of consistent ones is still caught.

Beyond the raw counts, the tool calls out a final line without a trailing newline — a common source of off-by-one errors in scripts that assume every record ends in a terminator — and renders a plain-language verdict: consistent LF, consistent CRLF, consistent legacy CR, or MIXED with the dominant style and every minority style spelled out along with its count.

Features

  • CRLF / LF / lone-CR counts — an exact per-style census computed from every terminator in the file, not a sample or an average.
  • Consecutive-terminator accuracy — runs of back-to-back lone CR bytes are each counted individually instead of being collapsed into one hit.
  • Dominant-style detection — the report names whichever style accounts for the most line breaks.
  • Mixed-file flag — any file with more than one terminator style present is explicitly called MIXED, with every minority style and its count listed, so an inconsistency never hides behind a majority-style summary.
  • Unterminated-last-line note — a trailing line with no newline is flagged separately so it never silently skews the terminator counts.
  • Line count — the total number of records the file splits into, alongside the terminator breakdown.
  • Filename hint — an optional label that appears in the verdict line so results from several files stay easy to tell apart.
  • 100% local — nothing leaves the browser, no upload, no server round trip.

How to Use

  1. Paste the raw text into the box exactly as it was captured or exported — do not pre-clean it, since the whole point is to see what is actually there.
  2. Optionally name the file in the file name field so the verdict line and any saved report identify which file was checked.
  3. Click Check endings. The tool scans the full text once and tallies CRLF, LF, and legacy CR terminators exactly.
  4. Read the verdict banner at the top of the report: a single consistent style, or a MIXED verdict naming the dominant style plus every other style found and its count.
  5. Check the badges for the raw CRLF / LF / legacy-CR numbers if precise counts are needed for a bug report or a support ticket.
  6. Normalize elsewhere if the verdict demands it — pair this checker with a converter or an editor line-ending setting once the exact mix is known.

Examples

Example 1 — Pipeline breakage. A downstream parser started seeing phantom characters at the end of some lines but not others. The checker shows CRLF mixed with LF in the same file, immediately pinpointing the cause.

Example 2 — Git diff noise. A commit appears to touch every single line with no visible content change. The checker confirms the endings switched from LF to CRLF (or back), which is the actual diff git is reporting.

Example 3 — Legacy export cleanup. An old system export uses lone CR line breaks throughout, including several records in a row with no LF at all. The checker counts every one of those consecutive CR terminators individually, so the legacy-CR badge reflects the true number of records rather than an undercount from collapsed runs.

Benefits

  • Precise terminators — CRLF vs LF vs legacy CR, each counted exactly, including consecutive runs of the same lone terminator.
  • Consistency verdict in plain language — mixed endings are never silent; the dominant style and every minority style are named with counts.
  • Catches the edge case that matters — a handful of stray terminators hiding among thousands of consistent ones is still reported, not averaged away.
  • Unterminated-line awareness — spot the off-by-one bug before it reaches a script that assumes every line ends in a newline.
  • Zero setup — paste and click, no upload, no file picker, no waiting.
  • Private — all processing stays in the browser; nothing is ever transmitted.

Frequently Asked Questions

What does a line ending checker do?
It inspects a raw text blob and reports how much of it is terminated with CRLF (\r\n), bare LF (\n), or the classic Mac \r ending, tells you which style dominates, and confirms whether the file is mixed.
Why does it matter?
Consumers disagree on endings: Unix parsers split on \n but leave \r attached to the end of every line, CSV and editor round-trips differ, and git flags whole-file changes when endings change. Knowing the style and detecting a silent mix prevents subtle breakage.
What does mixed mean?
A file is mixed when different lines use different terminators. That happens after two editors, platforms, or exporters touched the same file. Mixed files are the most likely to break pipelines that assume one style.
Does it count trailing lines?
A final line without a terminator is treated as one unterminated record and does not skew the line-ending counts. The report notes whether the last line lacks a newline.
Can it fix the file?
Pair this tool with the log encoding converter or your editor. The checker is diagnostic: it tells you exactly what you have (dominant style, mix, count) so the conversion is intentional.
Is my data uploaded?
No. Everything runs in your browser.

More Log tools

View All