All tools

CSS Grid Generator

Visualize and copy CSS grid layouts.

1
2
3
4
5
6
7
8
9
Generated CSS
.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
}

Generate CSS Grid Layouts

CSS Grid is the most powerful layout system in CSS, built for two-dimensional layouts with rows and columns. This generator lets you set the number of columns and rows and the gap, preview the grid, and copy the CSS.

Key properties

  • grid-template-columns — column track sizes
  • grid-template-rows — row track sizes
  • gap — spacing between tracks
  • repeat() and fr units for flexible tracks

The fr unit

1fr means 'one fraction of the available space'. repeat(3, 1fr) creates three equal columns that share the row width — responsive without media queries.

Private & Processed Locally

The CSS is generated in your browser; nothing is uploaded.

Frequently Asked Questions

Common questions about the CSS Grid Generator.

What can I configure?
The number of columns and rows and the gap between tracks, using repeat() and fr units.
What is the fr unit?
1fr is one fraction of the available space, so repeat(3, 1fr) makes three equal columns.
Is it private?
Yes, the CSS is generated in your browser.

More CSS Generators

View all tools →
CSS Clip Path GeneratorCSS Gradient GeneratorCSS Box Shadow GeneratorCSS Border Radius GeneratorCSS Animation GeneratorCSS Flexbox GeneratorCSS Transform GeneratorCSS Filter Generator
File Transfer