All Tools View Categories About Contact Privacy

Line Ending Checker

Count CRLF, LF and CR endings, spot mixed files, and find carriage returns clinging to values.

Runs entirely in your browser — nothing is uploaded.

About Line Ending Checker

Line endings are invisible until they are not. A .env edited once on Windows and once on Linux can end up with a mix of CRLF and LF, and while most dotenv libraries cope, the diff noise and the odd \r clinging to a value become real problems in scripts, containers and CI.

The Line Ending Checker counts each flavour — CRLF, LF and legacy CR — breaks the file down line by line, and tells you in one sentence whether the file is consistent or mixed. It also catches values with a stray carriage return hanging off the end.

Everything is computed locally; the file never leaves the page.

Features

  • Three-way count: CRLF, LF, CR broken down.
  • Verdict line: consistent vs mixed, with total lines.
  • Per-line breakdown: which lines use which ending.
  • Trailing CR check: stuck to values is flagged.
  • Byte-level honesty: counts are shown exactly.
  • Copy or download: export the report.
  • Instant: re-scans on input.
  • Private: 100% in-browser.

How to Use

  1. Paste your .env into the input, or load the sample (it mixes styles on purpose).
  2. The counts and verdict update instantly on the right.
  3. Read the breakdown to find inconsistent lines.
  4. Normalize the file with an editor or a converter.

Examples

Example 1 — Diff explosion. A PR touching .env shows every line as changed because someone's editor rewrote line endings. The checker proves the endings were already mixed.

Example 2 — Shell trap. A deploy script reads a value and hits a trailing on real servers. The checker pinpoints which line has the stray carriage return.

Example 3 — Container leak. docker-compose inherits the host file, and a CRLF line feeds a secret with a hidden \r into a container entrypoint.

Example 4 — Heritage files. A legacy .env carries CR-only endings from an old Mac editor; the checker names the exact lines.

Example 5 — Team policy. The team wants LF everywhere; the checker becomes the quick gate before commit.

Benefits

  • Mixed endings exposed: no more invisible drift.
  • Stray CR caught: protects shell and containers.
  • Exact counts: know how bad, precisely.
  • Editor hand-off: report guides the fix.
  • Private: file stays in the browser.
  • Free: unlimited use.

Frequently Asked Questions

Why do line endings matter in .env?
Most parsers handle both CRLF and LF, but a file that mixes them can confuse diff tools, shell scripts, docker-compose, and code that compares values exactly. A mixed file is usually the result of editing on both Windows and Unix.
What does the checker report?
It counts lines separated by (CRLF), alone (LF) and alone (CR, old Mac), shows a per-line breakdown, and concludes whether the file is consistent or mixed.
Can I convert the endings?
This tool reports only. For conversion, use the related converter tools, or your editor's save-with-line-endings feature after seeing the breakdown here.
Are invisible characters a problem?
Values stored with a trailing (e.g. KEY=value ) can break parsers that keep the raw character. The checker flags lines whose values carry a carriage return.
Is the file uploaded?
No. Detection is purely client-side.