Fuss-Free Browser Apps

Custom Keyboard Matrix Planner

No ads. No tracking. Calculates locally in your browser.


Total number of keys or buttons you want in your matrix (e.g. 12, 61, 104...).
Optional but recommended. This is the pin budget you can spare for the matrix.
This doesn't change the matrix maths but helps estimate diode count and wiring style.
The tool sorts by lowest pin count, then lowest wasted positions.
Matrix suggestions will appear here.
Enter your key count and pin budget, then click “Plan keyboard matrix” to see suggested row/column combinations.

FAQ

A keyboard matrix arranges keys in intersecting rows and columns. Instead of dedicating one microcontroller pin per key, the controller drives rows and scans columns (or vice versa). This reduces pin usage from keys to roughly rows + columns, at the cost of slightly more complex scanning firmware.
For each possible row count, the tool calculates the minimum number of columns needed to fit all keys. It keeps combinations where rows × columns covers the key count and where rows + columns is within your pin budget. Plans are then sorted by:
  1. Lowest total pins (rows + columns)
  2. Lowest wasted positions (empty matrix slots)
  3. Smallest overall matrix
The top entries are usually the neatest designs to route and scan.
Because matrix sizes are whole rows and columns, rows × columns is often slightly larger than your exact key count. Any extra cells are “wasted positions” — they exist in the matrix but have no physical switch connected. A small amount of waste is normal, especially for odd key counts.
In a plain matrix without per-switch diodes, certain three-key combinations can cause “ghosting” or “masking”, where phantom key presses appear or real presses are missed. Adding a diode in series with each switch allows current to flow only one way, which largely prevents ghosting and enables near-NKRO behaviour. The trade-off is extra parts and soldering.
If your pin budget is very tight, there may be no rows + columns combination that can cover all keys. The planner will then show the minimum pin count that would work, along with example matrices. At that point you can either reduce the key count, free up more pins, or consider I/O expanders.

If you’d like to help the site grow, the most useful thing you can do is link to it or share it with others. There’s also a crypto-friendly Support / Donate link in the footer if you ever feel like sending a small tip.