Ventora
PricingBlogCasesAbout
Log inGet started
  1. Ventora
  2. Free tools
  3. CSS Grid Generator
Website & design

CSS Grid Generator

Build bento grids, page layouts and flexbox rows by dragging. Copy CSS, HTML or Tailwind. Free, no signup.

  • 100% free
  • No signup
  • No limits
  • Runs in your browser
Bento presets
Page layouts presets
4
3

fr, px, %, rem, auto. 1fr = one share of the free space.

Fixed px rows keep bento cards even; auto fits the content.

16px
16px
Items (6)

Select an item in the preview to rename, move or resize it. Keyboard: Tab to an item, arrows move it, Shift + arrows resize, Delete removes.

Live preview
Drag across empty cells to add an item. Drag an item to move it, its corner to resize.
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 160px);
  gap: 16px;
}

.hero { grid-area: 1 / 1 / 3 / 3; }
.stats { grid-area: 1 / 3 / 2 / 5; }
.speed { grid-area: 2 / 3 / 3 / 4; }
.mobile { grid-area: 2 / 4 / 4 / 5; }
.secure { grid-area: 3 / 1 / 4 / 2; }
.integrations { grid-area: 3 / 2 / 4 / 4; }

/* Phones: one column, items in reading order */
@media (max-width: 767px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(160px, auto);
  }
  .grid > * { grid-area: auto; }
}
Want a whole site with this layout?

Ventora builds the website around it from a short description; you review the text first.

200 free credits, no card.

A CSS grid generator writes the grid-template-columns, grid-template-rows, gap and grid-area rules for you: set the columns and rows above, drag across empty cells to place each item, and copy the code. The tool opens on a six-card bento grid, the layout of tiles in different sizes that product sites use to show features at a glance.

Switch to Flexbox for rows of items that wrap, navbars and centring. Every layout can stack into one column on phones, and the link in your address bar keeps the whole layout, so you can share it or come back later.

How to make a CSS grid layout

  1. 1

    Pick a starting point

    Start from a bento or page-layout preset, or set the number of columns and rows yourself.
  2. 2

    Place the items

    Drag across empty cells to add an item, drag an item to move it, drag its corner to resize. Rename items to get readable class names.
  3. 3

    Copy the code

    Copy CSS, HTML or Tailwind classes, or download a demo page. Turn on “Stack on phones” for a responsive layout.

What is a bento grid?

A bento grid (named after the Japanese lunch box with compartments) is a layout of rectangular tiles of different sizes on one regular grid. One or two large tiles carry the main message; smaller tiles each hold one fact, feature or image. Apple’s product pages made it popular, and it is now common on SaaS landing pages and portfolios.

What makes a bento grid look right:

  • One clear hero tile. Usually 2 × 2 on a 4-column grid. If every tile is the same size, it is a card grid, not a bento.
  • Even gaps. 12–24px between tiles, the same horizontally and vertically, with the same corner radius on every tile.
  • Fixed row heights. Rows of 140–220px keep tiles aligned even when their content differs. Use auto only when the text length really varies.
  • No holes. Fill every cell; an empty cell reads as a mistake. The generator shows empty cells as dashed boxes.
  • 3 to 7 tiles. More than that and visitors stop reading.

CSS grid vs flexbox: which one to use

Grid is two-dimensional: you define rows and columns, then place items on them. Use it when items must line up in both directions: bento grids, page layouts with a header and sidebar, galleries, dashboards.

Flexbox is one-dimensional: items flow in a row (or a column) and share the space on that line. Use it for navbars, button groups, a row of cards that wraps, or centring one element.

LayoutUse
Bento grid, gallery with big and small tilesGrid
Header, sidebar, main, footerGrid (named areas)
Navbar: logo left, links rightFlexbox, justify-content: space-between
Cards that wrap onto new linesFlexbox with flex: 1 1 200px, or grid with repeat(auto-fill, minmax(200px, 1fr))
Centre one thingFlexbox, justify-content and align-items: center

Most pages use both: a grid for the page and flexbox inside each tile.

fr, auto and fixed sizes

1fr is one share of the space left after fixed tracks and gaps. 2fr 1fr makes the first column twice as wide as the second. 200px 1fr gives a fixed sidebar and a fluid main column. auto sizes a track to its content, which is what you want for a header or footer row.

repeat(4, 1fr) is shorthand for 1fr 1fr 1fr 1fr; the generator writes it whenever all tracks are equal. One gotcha: a 1fr column never shrinks below its longest word or widest image. If a long URL pushes your grid wider than the screen, use minmax(0, 1fr) (Tailwind’s grid-cols-4 already does).

grid-template-areas or line numbers?

Line numbers place an item by the grid lines it starts and ends on: grid-area: 1 / 1 / 3 / 3 means row line 1, column line 1, to row line 3, column line 3, so a 2 × 2 tile in the top-left corner.

Named areas draw the layout as text, which is easier to read and change:

grid-template-areas:
  "header header header"
  "nav    main   aside"
  "footer footer footer";

Then each item gets grid-area: header and so on. A dot (.) marks an empty cell, and every area must be a rectangle. Turn on Named areas to get this output.

Making a bento grid responsive

A 4-column bento grid is unreadable on a 360px phone. The usual fix is to switch to one column on small screens and let each tile take its natural height. With Stack on phones on, the CSS output ends with:

@media (max-width: 767px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: minmax(160px, auto);
  }
  .grid > * { grid-area: auto; }
}

On phones the tiles then appear in HTML order, so the generator writes the HTML in reading order (row by row, left to right). For a two-column tablet step, add a second media query with repeat(2, 1fr).

Tailwind CSS grid classes

CSSTailwind
grid-template-columns: repeat(4, minmax(0, 1fr))grid-cols-4
grid-template-columns: 2fr 1frgrid-cols-[2fr_1fr]
grid-column: 1 / span 2col-start-1 col-span-2
grid-row: span 2row-span-2
gap: 16pxgap-4
Only from 768px upmd: prefix, e.g. md:grid-cols-4

Tailwind is mobile-first, so with stacking on, the generator writes one column by default and the full grid behind md:.

Worked examples

Six-card bento grid for a feature section

4 columns of 1fr, 3 rows of 160px, 16px gaps. The hero tile spans columns 1–2 and rows 1–2 (grid-area: 1 / 1 / 3 / 3), a wide stats tile spans the top right, a tall tile runs down the right edge, and three small tiles fill the rest. On phones the six tiles stack in reading order.

Holy grail page layout

Columns 200px 1fr 200px, rows auto 1fr auto, height 100vh, written as named areas: header and footer across all three columns, nav, main and aside in the middle row. The middle row takes all the height the header and footer leave.

Cards that wrap with flexbox

display: flex; flex-wrap: wrap; gap: 16px and flex: 1 1 200px on each card: cards are at least 200px wide, share the row equally, and drop to the next line when there is no room. Pick the “Card row” preset to see it.

Frequently asked questions

Is this CSS grid generator free?

Yes. No signup, no limits, no watermark. The layout is built in your browser.

Can grid items overlap?

CSS allows it, but this generator keeps items from overlapping because a bento grid or page layout almost never wants it. If you need overlap (a caption on an image), give both items the same grid-area in the copied CSS and set z-index.

Does it output Tailwind classes?

Yes. Open the Tailwind tab. Standard values use the default scale (grid-cols-4, col-span-2, gap-4); anything else uses arbitrary values such as grid-cols-[200px_1fr], which work in Tailwind v3 and v4.

How do I center a div with flexbox?

On the parent: display: flex; justify-content: center; align-items: center; and give the parent a height. The “Center anything” preset writes exactly that.

What is the difference between auto-fill and auto-fit?

Both create as many columns as fit, as in repeat(auto-fill, minmax(200px, 1fr)). With few items, auto-fill keeps the empty columns, so items stay at their minimum width; auto-fit collapses the empty columns, so items stretch to fill the row.

Do all browsers support CSS grid?

Yes. CSS grid, gap for flexbox and grid-template-areas work in every current browser (Chrome, Edge, Firefox, Safari, including iOS). Subgrid is newer but also supported in current versions.

How do I save my layout?

The address bar holds the whole layout, so bookmark it or use Copy link. You can also download a standalone .html demo page with the HTML and CSS.

Updated November 2026

Related free tools

All tools →

Landing Page Examples

A curated gallery of real landing pages by industry, with notes on what makes each one work.

HTML Viewer

Paste HTML, preview it live, check it for errors and share it.

Font Pairing Previewer

Try curated heading and body font pairs on a sample landing page, blog post or app screen, then copy the code.

Coming Soon Page Builder

Make a coming soon, waitlist, link in bio or under construction page and download it as one HTML file.

Ventora

Build your idea with Ventora

Describe what you want to launch and Ventora builds the product, the landing page and the checkout.

Plain words are fine. Edit it before you start.

200 free credits, no card.

  • A working product and landing page you can publish
  • Payments, hosting and custom-domain setup built in
  • Describe it in plain words, no code

The AI-powered platform that turns ideas into revenue-generating products.

Product

  • Dashboard
  • Launch
  • Pricing
  • Cases
  • Blog
  • Made with Ventora
  • Free tools

Company

  • About
  • Investors

Legal

  • Terms of Use
  • Privacy Policy
  • Cookie Policy
  • Data Processing Agreement

For data, legal or abuse inquiries, contact: support@ventora.cc

© 2026 All rights reserved.