About the CSS Grid Generator
CSS Grid’s grid-template-areas lets you draw a layout in text — but getting the strings right by hand is fiddly. Here you set column and row tracks (fr, px, auto, minmax), then drag across cells to create named areas such as header, sidebar, main and footer.
Start from presets like the holy-grail layout, a dashboard or a bento grid. The CSS includes a mobile breakpoint that stacks areas in a single column, and the matching HTML skeleton.
How to use the CSS Grid Generator
- Set columns and rows (or pick a preset).
- Drag across cells and name each area.
- Copy the CSS and HTML.
Features
- Drag to create areas
- fr / px / auto / minmax tracks
- Gap control
- Mobile stacking rule
- Three layout presets
Supported formats
- CSS
- HTML
Frequently asked questions
Can areas be L-shaped?
No — CSS Grid areas must be rectangles. Split an L shape into two areas.
Is my text sent anywhere?
No. Everything runs in your browser, so nothing you paste is uploaded or stored.