Skip to content
Jellykit

Lines of Code Counter

Count lines of code, comment lines and blank lines across files or a whole project folder, with totals per language. Skips node_modules and binaries.

Runs in your browser. Nothing is uploaded.

About Lines of Code Counter

Lines of Code Counter totals the lines in any set of text files, split into code, comment and blank lines, with a summary per file extension and a sortable per-file table. Add a whole project folder and dependency folders like node_modules, .git, dist and build are skipped automatically.

Comment detection is a quick line-based estimate: it recognises //, /* */ and leading * for C-style languages, # for Python, Ruby, shell and YAML, -- for SQL and Lua, and <!-- --> for HTML, XML and Markdown. It's close to what tools like cloc report for most code.

Word and character counts are included too, so it doubles as a line counter for plain text files.

How to use Lines of Code Counter

  1. Open the tool above and add your file or text.
  2. Adjust the options to suit.
  3. Download or copy the result. Nothing is uploaded at any point.

Frequently asked questions

Is my code uploaded?

No. Files are read and counted in your browser tab, so it's safe to use on private repositories.

Why does my count differ from cloc?

Comment detection here is per line and doesn't parse strings, so a line starting with * or # inside a string can be miscounted. Total and blank line counts are exact.

Is Lines of Code Counter free and private?

Yes. Lines of Code Counter is completely free, with no sign-up and no watermark. Your files are processed inside your browser and never uploaded to a server, so they stay on your device.

See all files tools →