CSS Grid Online
Generator & Creator
The free visual CSS Grid generator — design any grid layout by clicking, export clean CSS, HTML and SCSS. No setup, no login required.
Set Column & Row Count
Use the + / − steppers in the sidebar to set how many columns and rows your grid needs. The live preview updates instantly.
Edit Track Sizes
Click any column label (above the grid) or row label (left of the grid) to change its track size — type 1fr, 200px, auto, minmax(100px,1fr), anything valid.
Adjust Gaps
Drag the Column gap and Row gap sliders to add spacing between tracks. The grid reflows in real time.
Copy CSS, HTML or SCSS
Hit Get Code or switch output tabs. Copy just the CSS, the HTML structure, nested SCSS, or the full combined snippet ready to paste.
CSS Grid Properties Reference
Every property this CSS Grid generator uses — explained clearly for both beginners and experienced developers.
Container Properties
gap: 16px 24px.Track Sizing Units
1fr 2fr gives a 1:2 ratio split.minmax(100px, 1fr) is a column that’s at least 100px and grows freely.repeat(3, 1fr) equals 1fr 1fr 1fr.When to Use This CSS Grid Creator
CSS Grid is a two-dimensional layout system — ideal when you need control over both rows and columns simultaneously:
Page Layouts
Full website templates — header, sidebar, main content, footer — in a single grid declaration.
Card Grids
Equal-column card grids with perfect gutters using repeat(auto-fill, minmax(200px,1fr)).
Image Galleries
Masonry-style or strict grid galleries where images span multiple rows or columns.
Dashboards
Admin UIs and analytics dashboards with widgets of varying sizes precisely placed.
Holy Grail Layout
The classic fixed header/footer + fluid sidebar + main content pattern solved in 5 lines.
Magazine Layouts
Editorial designs with overlapping, asymmetric, or feature-sized content areas.
Frequently Asked Questions
CSS Grid Online is a free visual CSS Grid generator and creator. You define columns and rows interactively, edit each track size inline, adjust gaps with sliders, then copy production-ready CSS, HTML, or SCSS — no configuration, no account needed, works in any browser.
Any valid CSS track size: 1fr, 2fr, 200px, 25%, auto, minmax(100px, 1fr), fit-content(300px), or any fixed length with em/rem units. The live preview applies your value immediately so you can see the result before copying.
The fr (fractional) unit represents a share of the remaining free space in the grid container. 1fr 1fr 1fr creates three equal columns. 1fr 2fr 1fr gives the middle column twice as much space as the others. It’s the most common unit for responsive grid tracks.
CSS Grid is two-dimensional — it controls both rows and columns at the same time, making it ideal for full-page layouts and complex UI regions. Flexbox is one-dimensional — items flow in a single row or column. In practice they complement each other: Grid for the outer structure, Flexbox for components inside individual grid areas.
The SCSS output stores gap values in $variables and nests all child item rules inside the parent container using SCSS nesting syntax. This keeps your stylesheet organised and makes global changes (like adjusting the gap) a single-variable edit. Plain CSS uses flat, standalone selectors compatible with any project without a preprocessor.
Yes — CSS Grid has over 97% global browser support including all modern versions of Chrome, Firefox, Safari, and Edge. No vendor prefixes are needed for modern browsers. IE 11 supported an older Grid spec with the -ms- prefix, but IE is no longer a deployment target for most projects.
Try also: Flexbox Online
