Free online tools

CSS Flexbox Generator

Set how a row or column of items should flow, then copy the container CSS.

Enter your values

This tool processes your input in your browser.

Result

Choose the axis and how excess items wrap

Direction sets the main axis. On a row, justify-content distributes items horizontally in left-to-right writing, while align-items controls their cross-axis positions. A column rotates that model.

Set a gap between adjacent items

Gap creates separation without giving items outside margins. With wrapping enabled, gap also adds vertical spacing between lines in a row layout.

Frequently asked questions

When should I use CSS Grid?

Flexbox arranges content along one principal axis. Grid lets you coordinate named columns and rows.