# CSS Grid Generator

> Build a grid layout with named areas by dragging over cells. Runs entirely in your browser — nothing is uploaded.

Source: https://toffeekit.com/tools/css-grid-generator

**Category:** [Design](https://toffeekit.com/category/design) · **Price:** Free · **Runs:** in your browser, nothing is uploaded

Open the tool: https://toffeekit.com/tools/css-grid-generator

**Also useful for:** css grid, grid-template-areas, grid layout, grid-template-columns, layout generator

## What you can do

- **Holy grail layout** — Header, footer, two sidebars and a main column. ([open with this preset](https://toffeekit.com/tools/css-grid-generator?preset=holy-grail))
- **Dashboard** — Sidebar, top bar and a grid of panels. ([open with this preset](https://toffeekit.com/tools/css-grid-generator?preset=dashboard))
- **Magazine page** — A big feature story with smaller ones beside it. ([open with this preset](https://toffeekit.com/tools/css-grid-generator?preset=magazine))

## How it works

1. Pick a layout such as Holy grail, Dashboard or Magazine, or set Columns and Rows yourself.
2. Type track sizes like 1fr, 200px, auto or minmax(0, 1fr) under Track sizes, and set the gaps.
3. Drag across empty cells in the preview to create an area, then click it to rename or delete it.
4. Choose Named areas or Line numbers for Item CSS, then copy the CSS, HTML or Tailwind classes.

## FAQ

### What is grid-template-areas?

It lets you draw the layout as text: each quoted string is a row and each word names the area in that cell. Items join an area with grid-area.

### What does the fr unit mean?

One fr is one share of the free space. Columns of 1fr 2fr split the leftover width into thirds, giving the second column two of them.

### Why must grid areas be rectangles?

The CSS spec only allows rectangular areas. That is why this tool only lets you drag rectangles and blocks overlapping ones.

### Why use minmax(0, 1fr) instead of 1fr?

A plain 1fr column won't shrink below its content's minimum width, so long words or wide images can push it wider. minmax(0, 1fr) lets it shrink evenly.

### How do I make a responsive grid without media queries?

Use grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)). Columns are then added or removed as the container width changes.

### Is CSS Grid Generator free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

## Privacy

CSS Grid Generator runs entirely in your browser. Your files and text are processed on your device and are never uploaded.

## Related tools

- [Color Picker & Converter](https://toffeekit.com/tools/color-picker) — Pick a color and convert HEX, RGB, HSL, OKLCH, CMYK.
- [Gradient Generator](https://toffeekit.com/tools/gradient-generator) — Build linear, radial and conic CSS gradients.
- [Contrast Checker](https://toffeekit.com/tools/contrast-checker) — Check WCAG contrast and find passing colors.
- [Palette Generator](https://toffeekit.com/tools/palette-generator) — Make harmonious palettes from one base color.
- [Shade Scale Generator](https://toffeekit.com/tools/tailwind-shade-generator) — Turn one color into a Tailwind 50–950 scale.
- [Box Shadow Generator](https://toffeekit.com/tools/box-shadow-generator) — Design layered CSS box shadows visually.

