Developer tool · Free · No sign-up
CSS Grid Generator
Visually build and generate CSS Grid layouts with live preview.
CSS Grid Generator
Visual preview
Click an item to select it, then change how many columns and rows it spans.
CSS
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
gap: 16px;
}HTML
<div class="container"> <div class="item-1">1</div> <div class="item-2">2</div> <div class="item-3">3</div> <div class="item-4">4</div> <div class="item-5">5</div> <div class="item-6">6</div> </div>
Tailwind
grid grid-cols-3 grid-rows-2 gap-[16px]
Grid
Item 1
Spanning past the last column makes the browser add implicit tracks; the preview caps column spans at the number of columns.
About this tool
CSS Grid is a powerful 2D layout system, but visualizing grid-template-columns and grid-template-rows in your head can be difficult. This interactive tool lets you adjust columns, rows, gaps, and alignment using sliders, giving you an instant live preview alongside the exact CSS code you need to copy into your project.
Key features
Visual Live Preview
See your grid layout update instantly as you adjust sliders.
Alignment Controls
Easily configure justify-items and align-items without memorizing syntax.
Clean Code Output
Generates formatted, copy-paste-ready CSS for your stylesheet.
How to use it
- 1Use the sliders to set the number of columns and rows.
- 2Adjust the gap slider to set the spacing between grid items.
- 3Use the dropdowns to change item alignment (justify/align).
- 4Watch the visual preview update in real-time.
- 5Click the copy button to grab the generated CSS code.
Common use cases
- Prototyping a responsive dashboard layout before writing code.
- Learning how CSS Grid alignment properties affect child elements.
- Quickly generating the foundational CSS for a complex card grid.
Frequently asked questions
Does it support fractional units (fr)?
Yes, the generated code uses `repeat(N, 1fr)` by default, which is the most robust way to create equal-width responsive columns.
Can I define specific column widths?
This tool focuses on generating equal-width grids. For custom template areas, you would modify the generated `grid-template-columns` string manually in your code.
Is my layout saved?
No. The tool resets on refresh. It is designed for rapid prototyping and code generation rather than project storage.
Private and free. This tool runs entirely in your browser, so the data you enter isn’t uploaded or stored. There's no sign-up, and there never will be — it's built by the Fusion Trail Solutions team to be genuinely useful.
Need a custom tool or web app?
We design and build production-grade web apps, internal tools and SaaS platforms. Tell us what you need.