DevTools Logo

LCOV Report Viewer

LCOV Report Viewer

Inspect coverage tracefiles, spot uncovered lines and export a summary — locally in your browser.

Runs in your browser
Try an example

LCOV tracefile

Coverage summary

No report yet

Paste LCOV output, upload a tracefile or load the sample.

Examples

Mixed coverage

Input
src/math.ts: 2/4 lines, 0/2 branches, 1/2 functions
Output
50% lines · 0% branches · 50% functions

Both declared counters and individual entries contribute to the roll-up.

Derived counts

Input
SF:a.ts, DA:1,1, DA:2,0 (no LF/LH)
Output
1/2 lines hit (50%)

Missing summary counters are inferred from DA entries.

Uncovered lines

Input
DA:5,0 and DA:6,0
Output
Uncovered lines: 5, 6

The detail panel sorts uncovered line numbers ascending.

About this tool

LCOV Report Viewer turns a raw LCOV tracefile into a readable coverage summary. Paste the output of gcov, Istanbul/nyc, c8 or another coverage tool, or upload a .lcov or .info file, and the viewer computes line, branch and function percentages for the whole report and for each source file.

The parser understands the standard record vocabulary: TN, SF, VER, FN, FNDA, BRDA, DA, LF, LH, BRF, BRH, FNF, FNH and end_of_record. When summary counters are missing it derives them from the individual DA, BRDA and FNDA entries, so partial reports remain useful. A record left open at end of input is closed with a visible parser note rather than silently discarded.

Selecting a file in the table shows its uncovered line numbers, declared functions with hit counts and branch entries with taken counts. A threshold filter isolates files below 80% line coverage, which is the usual first stop when deciding where to add tests.

The summary can be copied as Markdown for a pull request or downloaded as CSV for a spreadsheet. Parsing happens entirely in the browser: coverage traces often reveal internal file names and are never uploaded.

What this tool does not do

  • Only LCOV tracefiles are parsed; JSON, Cobertura and HTML reports are out of scope.
  • Source code is not displayed because LCOV files contain coverage data rather than file contents.
  • Branch and function counts come from tracefile entries; no AST or source re-analysis is performed.
  • Files are keyed by their SF path; the same path appearing twice creates two rows rather than being merged.
  • Reports are held in memory for the session only and are not saved between reloads.

How to use this tool

  1. Paste or upload a tracefile

    Generate coverage with your test runner, then paste the LCOV text or use the upload control. Example chips load a two-file report, a partial record and an error case.

  2. Read the totals

    The three headline cards show line, branch and function percentages with hit/total counts underneath.

  3. Inspect a file

    Click a file name to see uncovered lines, function hit counts and branch entries in the detail panel.

  4. Focus on weak spots

    Enable 'Show only files below 80%' to rank low-coverage files worst first.

  5. Export

    Copy the Markdown summary into a PR description or download the CSV table for further analysis.

Use cases

Pull request review

Copy the coverage summary into a PR to show which files drifted below the team threshold.

CI artifact triage

Open an .info artifact from a failing coverage job and find the concrete uncovered lines quickly.

Legacy projects

Inspect reports from tools that emit partial LCOV without summary counters.

Coverage audits

Rank low-coverage files to plan the next round of tests.

Recognised LCOV entries

EntryMeaning
SF:pathStarts a record for one source file
DA:line,hits[,checksum]Line execution count
BRDA:line,block,branch,takenBranch outcome; '-' means not taken/not applicable
FN:line,name / FNDA:hits,nameFunction declaration and execution count
LF/LH, BRF/BRH, FNF/FNHSummary counters; derived from entries when absent
end_of_recordCloses the current source-file record

Unknown keys and malformed numeric fields are reported as parser notes; valid records still render.

Common mistakes

Mistake:Expecting a rendered source file with highlighted lines.

Fix:The tool reports line numbers and counts, not source content; the tracefile does not contain source text.

Mistake:Assuming 0% for a file with no counters at all.

Fix:A zero denominator displays 0% so empty metrics never masquerade as perfect coverage.

Mistake:Pasting HTML or Istanbul JSON reports.

Fix:Convert to LCOV first; other coverage formats are not parsed.

Mistake:Dismissing parser notes as failures.

Fix:Notes describe skipped or inferred entries; valid records still produce a report.

Mistake:Sharing a report that contains internal paths.

Fix:The Markdown/CSV export is only as private as where you paste it; processing itself stays local.

Frequently asked questions

Which coverage tools produce files I can open here?

Any tool that emits LCOV tracefiles — gcov/lcov, Istanbul or nyc with the lcovonly reporter, c8, and many language-specific coverage runners. Look for records with SF:, DA: and end_of_record lines. Cobertura XML and JSON summaries are different formats and are not parsed.

What happens if LF/LH counters are missing?

The viewer derives line totals from DA entries, branch totals from BRDA entries and function totals from FNDA entries. A record without an end_of_record marker is closed at end of input with a parser note, so you still get a usable report.

How are percentages calculated?

Percent is hit count divided by found count, rounded to one decimal. When the found count is zero the tool displays 0% rather than 100%, so a file with no measured lines does not look perfectly covered.

Can I see which lines need tests?

Yes. Click a file in the table and the detail panel lists uncovered line numbers in ascending order, along with function hit counts and branch outcomes. The low-coverage filter ranks files below 80% worst first.

Does my coverage data leave the browser?

No. Parsing, aggregation and export all happen in the tab. Nothing is uploaded, and no report is persisted in localStorage — reloading the page clears the input.

Can I import or export other formats?

Export is available as Markdown (for PRs and wikis) and CSV (for spreadsheets). There is no round-trip export to LCOV and no support for merging two tracefiles in this viewer.

References & standards