Tools Guides
design Free No signup

CSS Grid Generator

Visually build CSS Grid layouts by dragging items across cells and export the CSS.

Loading tool…

About this tool

Define columns and rows with custom track sizes (fr, px, %, auto), set the gap, and click-drag on the live grid preview to span items across multiple cells. The tool generates ready-to-copy grid-template-columns, grid-template-rows, gap, and grid-column/grid-row declarations. Optionally assign named grid areas.

How to use

  1. 1 Step 1: Set the number of columns (1–12) and rows (1–8) and the gap size.
  2. 2 Step 2: Enter track sizes for each column and row using fr, px, %, or auto units.
  3. 3 Step 3: Click and drag on the grid cells to place and size items.
  4. 4 Step 4: Copy the generated CSS and paste it into your stylesheet.

Frequently Asked Questions

{# Alpine.js — self-hosted. (The previous jsdelivr CDN tag had a stale SRI integrity hash, so the browser refused to run it and window.Alpine was never defined — silently breaking every FAQ accordion and Alpine tool.) #}