Code Statistics
Count lines, characters, words, comment ratio, and other code metrics.
Input Code
Usage
This tool analyzes code metrics to help developers quickly understand code size and comment coverage.
Features
- Count total, code, comment, and blank lines
- Count characters, words, and function declarations
- Calculate comment rate to quantify documentation coverage
- Support for 10 languages: JavaScript, Python, Java, C/C++, Go, Rust, and more
- Visual bar chart showing code composition ratio
Steps
- Select the programming language from the dropdown in the top-right
- Paste the code to analyze in the input area
- Click "Sample" to load example code for a quick demo
- View the statistics cards at the top for an overview
- Check the "Code Composition" chart for code/comment/blank ratios
Notes
- Comment detection is regex-based; minor inaccuracies may occur
- Function count depends on language-specific declaration patterns
- Word count splits by whitespace and may be inaccurate for non-English text
- All computation runs locally in your browser; code is not uploaded
Related tools
More from the same category · Developer Tools
Cron ExpressionVisual Cron builder: pick minute-hour-day-month-weekday fields and preview next run times live.JSON FormatterJSON beautify, minify and validate with auto error location for missing brackets and stray commas.Timestamp ConverterConvert Unix timestamps to dates and back with second/millisecond precision and live current time.Regex TesterTest regex with live match highlighting, capture groups and substitution, toggling g/i/m/s flags.JWT ParserSplit a JWT into header, payload and signature, then base64url-decode claims and expiry without a key.JWT GeneratorIssue JWTs with custom header, claims and expiry across HS256, RS256, ES256 for auth-flow testing.