Tailwind CSS
Grid Generator

Generate responsive grid layouts for your Tailwind CSS project with this interactive tool.

Generated Code

<div class="grid grid-cols-4 grid-rows-3 gap-4">

</div>

Ready-made Grid Layouts

Explore grid layouts with these examples, to help you build flexible and dynamic layouts in your project.

Basic 2x2 Grid

Hero Layout

Dashboard Layout

Blog Layout

Gallery Grid

App Layout

Pricing
Free
Categories
Design
Listed
May 2023
Updated
Oct 2026
KEY POINTS
  • Web app
  • Code export
  • Tailwind CSS v4
  • Tailwind CSS v3

Short verdict: Tailwind Grid Generator is a free, no-account tool on this page: set up to 12 columns and rows, click cells into place, drag their corners to span tracks, and copy a Tailwind snippet. It gets the col-span and row-start numbers right for a fixed layout in a few clicks, and its six presets cover the usual dashboard, blog and gallery shapes. Our first test found five bugs, from overlapping cells to resizing that didn't work on phones, and we fixed them on 30 October 2026. What remains are limits, not bugs: no breakpoints and nothing is saved. Use it to sketch one layout at a time; don't expect a responsive grid out of it.

How we reviewed it: On 29 October 2026 we used the generator on this page with a mouse at 1,440 px and with touch input at 390 px. We built layouts by hand, applied all six presets, deleted and re-added cells, typed values outside the input limits, reloaded the page and read the clipboard after Copy Code. We rendered the exported code with Tailwind CSS 4.1.13 and 3.4.17 to see what each version does with it, and ran Lighthouse 12.8.2 once on mobile and once on desktop. Because the tool is ours, we also read its source, fixed what we found on 30 October and ran the same tests and Lighthouse again on the fixed version.

Disclosure: Tailkits makes this tool. We review it with the same tests we use for other makers' products and list its bugs the same way.

What you get for free

PriceFree, no account, runs in your browser on this page
ControlsColumns and rows from 1 to 12; gap from a list of Tailwind spacing steps (0 to 12, 14 and 16, so 4 is 1rem); click a cell to add it, drag its corner to span, × to remove it
Presets6: Basic 2x2 Grid, Hero Layout, Dashboard Layout, Blog Layout, Gallery Grid and App Layout
OutputOne HTML snippet: a wrapper with grid grid-cols-N grid-rows-N gap-N and one div per cell with col-span, row-span, col-start and row-start
Tailwind versionsEvery class it writes rendered the same in Tailwind CSS 3.4.17 and 4.1.13
Not includedBreakpoints, custom track sizes (fr, px, minmax), named areas, saving or sharing a layout

What we found

Building a layout takes a few clicks

The grid starts empty at 4 columns, 3 rows and gap 4. Clicking an empty slot adds a numbered 1x1 cell, and dragging the blue grip in its corner snaps the span to whole tracks. The code panel updates on every change, and Copy Code put exactly the snippet on our clipboard. Each preset replaces your current layout without asking, so copy your own work before you try one.

The Dashboard Layout preset: a 6-column, 4-row grid with a full-width header, a sidebar spanning 3 rows, a main area and two small cells, above the generated Tailwind code
The Dashboard Layout preset and the five-cell snippet it produces.

Five bugs we found and fixed

The first test, on 29 October, turned up five problems. Because Tailkits makes the tool, we fixed them the next day and repeated the tests on the fixed page:

  • Overlapping cells. Resizing didn't stop at taken cells, so the preview drew one cell over another while the exported code, which left out row-start-1, let the browser move it down. A cell now grows only into free cells, and every cell in the code has an explicit col-start and row-start, so the code places cells as the preview does.

  • Repeated cell numbers. After a delete, a new cell could get a number already in use, and × removed both. Numbers are now unique.

  • Values the code couldn't use. Typing 20 columns gave grid-cols-20 and an empty field gave grid-cols-; gaps of 13 and 15 have no class in Tailwind CSS 3.4. Columns and rows are now held to 1 to 12, and the gap is picked from a list both versions support.

  • No resizing on touch screens. Dragging a corner only listened to the mouse. It now works with touch, and the × button no longer hides until hover on small screens.

  • Unlabeled fields. The Columns, Rows and Gap labels were not connected to their fields, so a screen reader announced three unnamed inputs. They are now.

Before the fix: left, the generator preview with cell 2 drawn over a 2x2 cell 1; right, the same exported code rendered with Tailwind CSS 4.1, where cell 2 sits below cell 1
The overlap bug before the 30 October fix: the preview (left) and the exported code (right) disagreed.

No breakpoints and no saving

There is no way to set a layout per screen size, so the snippet is one grid for every width. Add md: and lg: classes yourself, or stack cells on phones with grid-cols-1. Reloading the page clears the layout: it is not stored in localStorage or sent to a server. The snippet uses class, so React and Next.js users need to change it to className.

Performance and accessibility

Lighthouse 12.8.2, 29 OctoberPerformanceAccessibilityBest practicesSEO
Mobile598875100
Desktop959274100

The mobile score comes from scripts, not from the generator: 445 KiB of the page's 685 KiB transfer is third-party analytics, and total blocking time was 2,840 ms on a simulated phone. The generator itself sends nothing; the requests we logged were Tailkits' page analytics (Google Analytics, Microsoft Clarity, Umami and PoeticMetric). After the label fix, accessibility rose to 92 on mobile and 96 on desktop in a re-run on 30 October. The remaining failures are low-contrast text and the heading order of the page.

What the snippet leaves to you

  • Breakpoint classes for tablets and phones.

  • Row sizes: grid-rows-N makes equal rows, which only shows when the wrapper has a height; the preview's 100 px cells are not in the code.

  • Your content, and className instead of class in JSX.

Pros and cons

Pros

  • Free, instant and in the browser, with no account.

  • You drag spans and read the code side by side, so col-start and row-span numbers come out right without counting tracks.

  • Six presets cover the common page shapes.

  • Output is plain Tailwind classes that rendered the same in v3.4 and v4.1.

  • Works with a mouse or touch.

Cons

  • No breakpoints, so no responsive grid.

  • Only equal-width tracks: no fr, px or minmax sizes and no named areas.

  • Layouts are lost on reload, and a preset replaces your work without asking.

How Tailwind Grid Generator compares

  • Layoutit Grid (free) sizes each track in fr, px, %, em or minmax, supports named areas and exports HTML and CSS or a CodePen, but no Tailwind classes. Choose it for mixed track sizes or grid-template-areas.

  • CSS Grid Generator by Sarah Drasner (free) sets columns, rows and pixel gaps and writes plain CSS. Choose it if your project doesn't use Tailwind.

  • Tailwind Play (free) is the official online editor: you write the grid classes yourself, including md: and lg: variants, with a live preview. Choose it once you need breakpoints.

More Tailwind generators and design tools are in UI design tools.

Who should use Tailwind Grid Generator

Use it when you know the layout you want and need the Tailwind span and start classes fast, for a dashboard, a bento section or a gallery. Then add breakpoints by hand. If you need a responsive grid in one go, named areas or tracks of different sizes, start in Tailwind Play or Layoutit Grid instead.

FAQ

Is the Tailwind Grid Generator free?

Yes. It is free, needs no account and runs in your browser on this page.

Does the generated code work with Tailwind CSS v3?

Yes. Columns and rows go up to 12 and the gap list only offers steps v3 has, and every class we generated rendered the same in Tailwind CSS 3.4.17 and 4.1.13.

Can I make a responsive grid with it?

Not directly. The tool has no breakpoints, so the snippet is one grid for every screen. Add md: and lg: classes to the wrapper and cells yourself, for example grid-cols-1 md:grid-cols-4.

Does it save my layout?

No. Reloading the page clears the grid, and applying a preset replaces it. Copy the code before you leave or try a preset.

Can I use it on a phone?

Yes. Tapping adds cells, dragging a corner resizes them and the delete button is always visible on small screens, though a large grid is easier to build on a wider screen.

Do you make Tailwind Grid Generator? Get a badge for your site

An optional "Featured on Tailkits" badge that links to this page. Pick light or dark and paste the code into your site, for example in the footer.

Featured on Tailkits
Featured on Tailkits