← All text tools

Lines of code counter

Count code, comment and blank lines in your files.

  • Free
  • No sign-up
  • Works on any device

About Lines of code counter

Add your source files and see how many lines are code, comments and blank. Lines of code is a rough measure of project size and is used in estimates and reports, but it says nothing about quality. Counting separately avoids inflating the total with comments and spacing.

How to use Lines of code counter

  1. Add your code files or paste the code.
  2. Wait for the counts of code, comment and blank lines.
  3. Read the totals and compare them between files.

Why use this tool?

Also known as

Frequently asked questions

Is lines of code a good productivity measure?

Not really. It shows size, not value, and shorter solutions are often better. Use it to compare project scale, not to judge developers.

How are comment lines detected?

The tool recognises common comment markers for the file type. Unusual syntax or comments inside strings may be counted as code, so treat the numbers as estimates.

Do blank lines count as code?

No. Blank lines are reported separately, so you can see the real number of lines that contain code.

Is Lines of code counter free?

Yes. Lines of code counter on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put Lines of code counter on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools