Build layouts visually - adjust columns, rows, gaps and alignment and see them update in real time. Copy the finished code in CSS, Tailwind, JavaScript or SCSS.
Free • No signup • CSS • Tailwind • JavaScript • SCSS
A CSS Grid generator is a visual tool that helps you create page layouts using CSS Grid, without having to write all the code from scratch.
You can choose how many columns and rows you want, adjust the spacing between them, and see your layout change instantly in a live preview.
Without a generator, creating a CSS Grid layout can involve a lot of trial and error. You write some code, check how it looks in the browser, make changes, and repeat. A generator makes this much quicker because you can build the layout visually first, then copy the finished code when you are happy with it.
Most CSS Grid generators only give you CSS code. Gridlock Holmes can generate CSS, Tailwind, JavaScript and SCSS at the same time, so you can copy the version that suits the way your website or project is being built.
It also works alongside Grid Detective, a free tool that checks your grid code and helps you spot errors.
Create your grid in four simple steps. See your changes instantly, then copy the code when you are happy.
Choose how many columns you want and how wide they should be.
Use flexible fr units, fixed px widths, or combine both.
Choose how many rows you want and how tall they should be.
Use auto for flexible heights, or px and rem for fixed heights.
Choose the space between your rows and columns. Then adjust where your grid items sit. Your preview updates instantly as you make changes.
Choose CSS, Tailwind, JavaScript or SCSS. Then click Copy and paste the code into your project.
Build your layout once. Copy the code in whichever language your project uses - all four outputs update simultaneously.
Standard CSS using grid-template-columns, grid-template-rows, gap and all native grid properties. Clean output, no vendor prefixes.
Utility classes for Tailwind v3 and v4. Covers grid-cols, col-span, gap, and all supported Tailwind grid utilities.
Sets grid layout via element.style in plain JavaScript. Useful for dynamic grids and component-based frameworks.
Grid properties with Sass-friendly formatting. Slots straight into existing SCSS variables and mixins.
Open a preset and adjust it to match your design - or start from a blank canvas.
Equal-width responsive cards. Uses repeat(auto-fill, minmax()) to wrap automatically at any screen width.
Header, footer, main content and two sidebars. The standard page shell layout for most websites.
Top bar, sidebar navigation, main content area and a stats row. Built for app UIs and admin interfaces.
Asymmetric columns for editorial and content-heavy pages. Mix large feature areas with smaller content blocks.
A generator doesn’t replace understanding CSS Grid. It simply makes prototyping faster by removing the constant edit-save-refresh cycle.
Use the generator to build and test your layout, then refine the code and use it in your project.
| What matters | Writing CSS by hand | Gridlock Holmes generator |
|---|---|---|
| See changes | Only after save and refresh | Instantly, as you adjust |
| Error risk | Easy to mistype or miscalculate spans | Visual feedback catches errors before you copy |
| Learning curve | Memorise syntax first | Understand by seeing, then read the output |
| Output quality | As clean as you write it | Clean, consistent, no vendor prefixes |
Beginners learning CSS Grid. No experience needed - the visual feedback shows what each property does before you need to write any code.
See CSS Grid for Beginners →
Designers translating Figma layouts to CSS. Set up the same column structure, gaps and alignment and copy the CSS to match your design exactly.
See CSS Grid for Designers →
Developers who want to prototype grid layouts quickly and copy clean code in CSS, Tailwind, JavaScript or SCSS - without the edit-save-refresh cycle.
See CSS Grid for Developers →
Teachers using Gridlock Holmes in classroom sessions. Students can build layouts visually, then export and discuss the code.
Get Educator Resources →Paste your finished grid code into Grid Detective and it will flag any errors, warnings or improvements - in plain language, with a suggested fix.
Use Grid DetectiveNo signup. CSS, Tailwind, JavaScript or SCSS output. Works in your browser.