CSS Grid Generator

Design CSS grids visually and copy the CSS.

Free CSS Grid generator. Set the number of columns and rows and the gap, preview the grid live, and copy the grid-template CSS. Runs entirely in your browser.

How to use the CSS Grid Generator

  1. 01Set how many columns and rows you want.
  2. 02Adjust the gap between cells.
  3. 03Copy the generated CSS Grid code.

Frequently asked questions

What does repeat(3, 1fr) mean?

It creates three equal-width columns, each taking one fraction (1fr) of the available space. The generator uses this fractional syntax so your grid stays responsive.