Skip to content
LovelyTools
EN

CSS Grid Generator

Draw named grid areas visually and copy grid-template-areas CSS and HTML.

Processed locally on your device — nothing is uploaded.

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

  1. Set columns and rows (or pick a preset).
  2. Drag across cells and name each area.
  3. 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.