Skip to content
Convertto

CSS Flexbox Generator

Experiment with flex direction, alignment and wrapping, then copy the CSS.

To build a flexbox layout, choose a direction and alignment and the preview updates instantly. The key idea is that justify-content works along the main axis and align-items across it — so changing direction to column swaps which property controls horizontal position.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Why does justify-content suddenly move things vertically?

It always works along the main axis, and flex-direction decides which axis that is. With direction: column the main axis is vertical, so justify-content controls vertical spacing and align-items controls horizontal.

How to use the css flexbox generator

  1. 1Choose the direction.
  2. 2Choose the wrap.
  3. 3Choose the justify content (main axis).
  4. 4Choose the align items (cross axis).
  5. 5Set the gap.
  6. 6Set the preview items.
  7. 7The result appears immediately — copy or download it.

Embed this tool

Put the working css flexbox generator on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More css generators