← All Tools

Code Heatmap Formatter🔒 100% local

Visualize code execution frequency. Privacy-first, no server uploads, no tracking.

Code Heatmap Formatter: related tools

Border Radius PreviewBox Shadow GeneratorCode Sanitizer

Scores pasted code line by line: each branch keyword adds 2, indentation depth and bracket count add 1 each, every 40 characters adds 1, and a recognised function signature subtracts 1. The scores are scaled against the worst line and drawn as a three-character block ramp next to the line number, with branchy and long lines flagged on the right. Under the map it reports code/comment/blank counts, an estimated cyclomatic complexity, the deepest indent, a maintainability score out of 100 and the five lines to look at first.

Code Heatmap: how to use it

  1. Paste the function or file into the box.
  2. Press Process.
  3. Work down the hot-spot list at the bottom of the report; it repeats the highest-scoring lines with their numbers.

Code Heatmap: worked example

function f(x) { if (x) return 1; }becomesHeatmap legend: . : - = + * # % @ (light → heavy) 1 ::: function f(x) { 2 @@@ if (x) return 1; 3 } Summary: Lines: 3 (3 code, 0 comment, 0 blank) Comment ratio: 0% Cyclomatic (est): 2 (simple) Max indent depth: 1 Branchy lines: 0 Long lines: 0 (>120 chars) Maintainability: 96/100 Hot spots (fix these first): line 2 score 4 if (x) return 1; line 1 score 1 function f(x) { How the score is computed: 2 per branch keyword, +1 per indent level, +1 per 40 chars, +1 per bracket, -1 for a function signature. Rule of thumb: a function above cyclomatic 10 is hard to test; above 20 it is hard to reason about. Extract branches into named helpers.

The bar is relative: line 2 is the heaviest line here, so it gets the darkest symbol, and its indent and bracket count give it a score of 4.

Code Heatmap: when to use it

Code Heatmap: what it does not do