CSS Grid Playground — A visual editor for CSS Grid. Define your grid with grid-template-columns and grid-template-rows using the fr, px, %, em, and auto units. Place items by line number, named area, or named line. See the layout update in real time and copy the generated CSS.
All rendering happens locally. The CSS you generate never leaves your browser.
Was CSS Grid Playground useful?
What is CSS Grid Playground?
A visual editor for CSS Grid. Define your grid with grid-template-columns and grid-template-rows using the fr, px, %, em, and auto units. Place items by line number, named area, or named line. See the layout update in real time and copy the generated CSS.
Useful for learning grid, prototyping a layout before writing code, or debugging a grid issue. The generated CSS is plain — no preprocessor, no framework.
How to use it
-
Set columns and rows
Set the number of columns and rows, and their sizes (e.g. 1fr 1fr 200px).
-
Place items
Add items with the + button. Each item can be placed by line number (grid-row / grid-column) or by named area.
-
Edit named areas
Edit named areas with the textarea below the preview — the syntax is the same as grid-template-areas.
-
Copy the generated CSS
Copy the generated CSS from the right-hand panel.
Examples
Three-column responsive card grid
Distribute equal-width tracks cleanly with uniform row and column gaps.
columns: repeat(3, minmax(0, 1fr)) | rows: auto | gap: 16px
Result: display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
Sidebar + fluid workspace layout
Pair a fixed navigation rail with a main column that expands to fill the container.
columns: 240px 1fr | rows: auto 1fr | gap: 20px
Result: display: grid; grid-template-columns: 240px 1fr; grid-template-rows: auto 1fr; gap: 20px;
Frequently asked questions
Related guides
How to Build a CSS Grid Layout (with Real Examples)
Master two-dimensional CSS Grid with six essential properties, repeat(auto-fit, minmax()), named template areas, and Flexbox vs Grid trade-offs.
The 8 Best Free CSS Tools in 2026 (No Signup, No Upload)
Eight free browser-based CSS tools—minifiers, gradient and shadow builders, Flexbox/Grid playgrounds, unit converters, and selector games—with no signup.
How to Build a CSS Flexbox Layout (with Real Examples)
Master one-dimensional CSS Flexbox using display, flex-direction, flex-wrap, justify-content, align-items, and gap—plus fixing min-width overflow.
Related tools
CSS Flexbox Playground
Visual playground for CSS Flexbox. Adjust container and item properties with sliders, see the live layout update, and copy the generated CSS.
CSS Gradient Generator
Build linear and radial CSS gradients visually. Pick colors, drag stops, copy the CSS.
CSS Minifier
Shrink CSS by stripping comments, collapsing whitespace, and tightening punctuation. See byte savings live.
Color Picker
Pick any color and copy it as HEX, RGB, or HSL.