Count total lines, blank lines, code lines, and comment lines in text or source code.
Line Counter is a free, browser-based tool built for developers, designers, and everyday users. Count lines, blank lines, code lines, and comment lines in your text or code. Supports multiple languages. Free online line counter tool. This tool processes everything locally using JavaScript β no data is uploaded to any server, no account is required, and there are no usage limits. Whether youβre working on a quick project or handling sensitive data, your privacy is fully protected. Bookmark this page and use it anytime β it works on desktop, tablet, and mobile devices.
For JavaScript/TypeScript: lines starting with // or /* blocks. For Python: lines starting with #. For HTML: <!-- blocks. For CSS: /* blocks. Lines with inline comments after code are counted as code lines.