html69// dev utilities

CSS tool

CSS Flexbox Generator

A CSS flexbox generator. Dial in direction, wrap, alignment, and gap, then copy CSS or Tailwind. It all stays on your device.

Like the tool? Find a bug?Share with us

Generator

Set direction, wrap, alignment, and gap. Click a box to select it, then type how many divs to add. CSS stays on your device.

Preview

Display

Direction

Wrap

Justify

Align

Item 1

Basis

Self

Supported files: .css
.flex {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
}
flex justify-center items-center gap-4
<div class="flex">
  <div>1</div>
  <div>2</div>
  <div>3</div>
</div>

Guide

How this CSS flexbox generator works

01

One container, many items

The parent is display: flex. Direction is the main axis. Wrap lets items break onto the next line. Sample centers three boxes with a 16px gap.

02

Justify vs align

justify-content packs along the main axis. align-items lines them up on the cross axis. Click a numbered box to set grow, shrink, basis, order, and align-self.

03

CSS, Tailwind, or HTML

Copy a .flex rule, Tailwind utilities, or the matching markup. Paste an existing flex declaration to reverse it onto the controls. Nothing leaves the browser.

Use it

What to copy

Navbar, Wrap, Column, Sidebar, and Stretch are starting points. Use CSS in a stylesheet. Use Tailwind when the rest of the UI is utilities. Item rules only appear when a box is not the default 0 1 auto.

FAQ

Questions

Flexbox or grid?

Flexbox is one-dimensional: a row or a column that can wrap. Use it for nav bars, toolbars, and clusters of boxes. CSS Grid is for two-dimensional page layout.

Can I edit existing CSS?

Yes. Paste a display: flex block, including :nth-child() item rules. Direction, wrap, justify, align, gap, and flex item values map back onto the controls.

Is there a size limit?

Paste is capped at 50,000 characters. Type a number of divs, up to 12, so a huge dump cannot freeze the tab.

Is my CSS uploaded anywhere?

No. Preview, copy, and download run in this tab. There is no account and no API call.