CSS Grid Playground
Build CSS Grid layouts visually: set columns, rows, gap, and item placement, then copy the ready-to-use CSS.
Grid Settings
Separate tracks with spaces. Use fr, px, %, auto, repeat().
Leave blank to let rows auto-size.
16px
Grid Items
Live Preview
CSS Output
Copied!
Item 1
Summary
Build CSS Grid layouts visually: set columns, rows, gap, and item placement, then copy the ready-to-use CSS.
How it works
- Use the Columns field to define column tracks, e.g. "1fr 1fr 1fr" or "200px auto 1fr".
- Use the Rows field to define row tracks, e.g. "100px auto" or "repeat(3, 1fr)".
- Adjust the Gap slider to set spacing between grid cells.
- Add grid items with the Add Item button, then set column-start, column-end, row-start, and row-end for each.
- Watch the live preview update instantly as you change any setting.
- Click Copy CSS to grab the complete grid CSS declaration block.
Use cases
- Rapidly prototyping page layouts without leaving the browser.
- Learning CSS Grid by seeing how track definitions translate to visual layouts.
- Generating grid CSS for complex multi-column dashboards and cards.
- Testing item placement with grid-column and grid-row span values.
- Copying production-ready CSS Grid code into any project.
- Teaching CSS Grid concepts interactively in workshops or classrooms.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu