Local StudioDEVELOPER TOOLS Source Code Line Counter
100% Offline Download Tool Tools Catalog

Source Code Line Counter

Count code, comment-only and blank lines in JavaScript and TypeScript files or a local project folder.

Choose Source Files

Choose files or a project folder.

Counting Rules

JavaScript, JSX, TypeScript and TSX. Lines with code and comments count as code.

Language and Line Rules

Supported extensions are .js, .mjs, .cjs, .jsx, .ts, .mts, .cts and .tsx. Other extensions stay in the report as skipped.

CRLF, LF, CR and Unicode line or paragraph separators end physical lines. A final terminator does not add an empty line. Whitespace-only lines are blank. Nonblank comment-only lines include block comments and the initial hashbang.

Folder exclusion matches full directory names without regard to case. Choose Folder retains relative paths. Individually selected files may supply only their basename.

File Details

Instructions

  1. Choose local files, use Choose Folder to retain project paths or select Open Sample.
  2. Review the directory filter and select Count Lines. The default excludes complete vendor and node_modules directory names, ignoring case.
  3. Read the totals. Choose a file name for its counts or the reason it was skipped. A line with code and comments counts as code, and whitespace-only lines count as blank.
  4. Download CSV to keep the full report and counting rules, including excluded or unsupported entries.
  5. Use UTF-8 source. One selection holds up to 5,000 files and 2 Mi UTF-16 code units of paths. The local scan allows 3 MiB and 1 Mi UTF-16 code units per file, 32 Mi UTF-16 code units across decoded source, and up to 30 seconds per scan.
  6. The parser reports syntax it cannot read. Only counted files contribute to totals. Identifiers beginning like spreadsheet formulas receive an apostrophe in the CSV.

Measure source lines in a local JavaScript or TypeScript project and export the per-file counts.

Security Check

Source Code Line Counter

Count source lines on your device without running the code.

  • Choose Source FilesSelect individual files or a project folder. The sample includes excluded and unsupported entries.
  • Review Per-File CountsOpen a file row to see physical, code, comment-only and blank lines or its skip reason.
  • Save the Full ReportDownload CSV with every file, the effective directory filter and the counting rules.

Local Security Check

Checking This Tool

Checking the launch, browser policy, and resources.

    These checks cover this tool page. Website links open only when selected.

    File Access

    Read only the files or project folder you select in your browser.