Flexbox & Grid Generator
Build flex and grid layouts visually; copy CSS.
Drag the bottom-right corner of the preview to test different widths.
.container {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-start;
align-items: stretch;
gap: 12px;
}flex flex-row flex-wrap justify-start items-stretch gap-3<div class="container">
<div class="item">1</div>
<div class="item">2</div>
<div class="item">3</div>
<div class="item">4</div>
<div class="item">5</div>
</div>How to use
- 1Choose Flexbox or CSS Grid.
- 2Adjust direction, wrapping, alignment, columns and gap.
- 3Watch the live preview; drag its corner to test widths.
- 4Copy the CSS, Tailwind classes or HTML.
Frequently asked questions
When should I use Flexbox vs Grid?
Flexbox is best for one row or column of items; Grid is best for two-dimensional layouts with rows and columns.
What does auto-fit minmax do?
repeat(auto-fit, minmax(160px, 1fr)) makes as many columns as fit, each at least 160px wide — a responsive grid without media queries.
Are the Tailwind classes exact?
Yes for standard values; custom grid templates use Tailwind's arbitrary value syntax.
Does it work in all browsers?
Flexbox, Grid and gap are supported in all modern browsers.
Is my data uploaded?
No. Everything runs in your browser; nothing you paste is sent to a server.
You may also need
Fake Data Generator
Indian test data as JSON, CSV, Excel or SQL.
JWT Generator
Sign JWTs with HS256/384/512 or verify a signature.
Bcrypt Generator
Hash passwords with bcrypt or check a hash.
AES Encryption
Encrypt and decrypt text with a password (AES-256).
TOTP Generator
2FA codes and authenticator QR for testing.
.gitignore Generator
Combine .gitignore templates and download.