Category: Developer tools
CSS Grid Generator
Build a grid-template layout and copy the CSS
Set the column and row count and the gap on a live grid preview, optionally switch to minmax() columns, then copy the .container rule. Runs in your browser.
123456
Output
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(2, 1fr);
gap: 12px;
}Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
Set the column and row count and the gap on a live grid preview, optionally switching columns to a minmax() track so they can shrink before wrapping, then copy the finished container declaration. Nothing here leaves your browser.
How to use it
- Set the shape of the grid: choose how many columns and how many rows the container should have and watch the preview redraw with numbered cells so the grid-template structure is visible.
- Set the gap: adjust the spacing between cells and check the result against the preview instead of guessing values and reloading your page.
- Decide how the columns behave when space runs out: leave repeat(n, 1fr) for equal columns that never shrink below their content, or turn on minmax() columns so each track can shrink to a floor before the grid wraps, then copy the CSS.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- How do I use CSS Grid Generator?
- Set the number of columns and rows, adjust the gap between cells, then decide whether to turn on minmax() columns. The preview is a real grid that redraws with every change, so you can confirm the layout before copying the finished .container rule into your stylesheet.
- Which inputs and options does CSS Grid Generator support?
- Column count, row count, the gap between cells, and a switch that turns the columns into a minmax() track. The output is the container declaration, so there is no named-area editing, no drag-and-drop cell placement and no per-item placement settings.
- How do I view or copy the result?
- The preview and the generated .container rule update as you change options. Copy the finished declaration to your clipboard and paste it into your stylesheet — there is no file download and no sign-in.
- Is my input, file, or result uploaded?
- No. Inputs, files, settings, and results stay in the browser and are not uploaded to LocalTools. The grid preview and the CSS are produced on your own device, with no server upload and no cloud processing.
- What does this tool not support?
- It writes the grid container declaration and nothing more. There are no accounts, sync or cloud history, no server-side processing, and no formats, algorithms, validation, batch or export features beyond copying the rule.