InstantTools.siteZero Latency Utilities
dev Tool
100% In-Memory (Zero Server Upload)

CSS Grid Generator

Generate grid-template-columns, gap, alignment and span rules from a live preview, with cell spans and a downloadable stylesheet.

Grid settings

Cell spans

Click any cell in the preview, then set how many rows and columns it spans.

Live preview

Showing 9 cells. Selected cells show a blue ring.

Generated CSS

/* CSS Grid generator — generated by InstantTools.site */
.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 16px;
  justify-items: stretch;
  align-items: stretch;
  grid-auto-rows: 80px;
  padding: 16px;
}

.grid-item {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
}

335 characters

How the grid CSS is assembled

  • repeat(3, 1fr) splits the row into three equal fractions; repeat(3, minmax(0, 1fr)) adds a zero minimum so long content can shrink instead of overflowing.
  • repeat(auto-fit, minmax(180px, 1fr)) is the responsive pattern — columns collapse automatically on narrow screens.
  • gap is emitted as row-gap column-gap, and grid-auto-rows fixes the height of rows created implicitly by spanning cells.
  • Each spanning cell gets its own .grid-item--n rule so you can copy just the spans you need.

About CSS Grid Generator

Build a grid layout visually and get valid CSS at the same time. Set the number of rows and columns, choose a sizing strategy from equal fractions through fixed pixels to auto-fit with a minimum, and adjust row gap, column gap, alignment and row height. Individual cells can span extra rows or columns, which is where grid templates usually get fiddly. The preview updates as you type, and the generated rule covers both the container and the span helpers.

Key Features & Privacy Guarantee

  • Zero server transmission: all computation happens instantly in your local browser runtime.
  • No sign-up, no subscriptions, and no usage quotas.
  • Optimized for maximum speed, accuracy, and lightweight performance.
  • Instant one-click clipboard copying.

Frequently Asked Questions

Common questions and helpful answers about this utility.

auto-fit with minmax lets columns collapse when space runs out, which makes a layout responsive without extra breakpoints. Fixed repeat counts keep every column the same width regardless of available space.