About CSS Grid Generator
Design a CSS grid by choosing the number of columns and rows, track sizes and gaps, then copy the grid CSS. The preview draws every cell, so you can see how tracks divide the space. Track sizes are offered as presets such as 1fr, minmax(0,1fr), auto and 100px.
How to use CSS Grid Generator
- Set the number of columns and rows.
- Choose a track size and the gap.
- Check the preview cells.
- Copy the CSS.
Tips and good to know
- 1fr columns share space equally; minmax(0,1fr) also stops long content from stretching a column.
- The grid is limited to 96 cells to keep the preview responsive.
- Use auto-fit with minmax in your own CSS for responsive card grids.
Grid in a nutshell
CSS Grid places items into rows and columns at the same time. The fr unit shares out the remaining space, so “1fr 2fr” gives the second column twice the width of the first. repeat(auto-fit, minmax(200px, 1fr)) creates as many columns as fit the screen, which builds a responsive card layout without media queries.
Grid and Flexbox work well together: Grid for the page structure, Flexbox for the content inside each area.
Frequently asked questions
Can I type custom track sizes?
Not here; the presets keep the output valid. Edit the copied CSS for custom values.
What does a CSS grid generator do?
It writes the grid CSS for you. You choose the number of columns and rows, the track size and the gap, see the layout drawn as cells, and copy display: grid with grid-template-columns, grid-template-rows and gap ready to paste into your stylesheet.
How do I make a responsive grid?
Copy the generated code, then replace the column list with repeat(auto-fit, minmax(200px, 1fr)). The browser then fits as many 200 px or wider columns as the screen allows and wraps the rest onto new rows, with no media queries.
Is this grid CSS generator free to use online?
Yes. It is free, needs no account and runs in your browser, so you can use the code in personal and commercial projects.
Is CSS Grid Generator free?
Yes. CSS Grid Generator is 100% free: no sign-up, no paid plan, no trial and no limit on how often you use it. It runs in your browser, and ToolzAura is paid for by ads, so every tool stays free.
Are my files uploaded?
No. This tool runs in your browser, so your input stays on your device.