99+ Free Tools
← Back ✕ Close

CSS Flexbox Generator

Build Flexbox layouts visually and copy the CSS for the container and items.

Boxes arranged in a flexible row layout
The preview and code update live as you change the settings.

Flex settings

Preview and CSS

CSS flexbox ready · 4 boxes.

How this tool works

Method. Choose the direction, justification, alignment and wrapping, set the gap and how many sample boxes to show, and adjust item grow and shrink. The preview updates live and the CSS below covers both the container and its items.

Limits. From 2 to 12 sample boxes; gap from 0 to 50 px.