← All Tools

CSS text-wrap Playground

Compare balance, pretty, stable, wrap, and nowrap side-by-side at the same width. balance evens out line lengths for headings; pretty avoids the orphan last line in prose; stable stops layout shift while editing. Live width slider, last-line metrics, copy-ready CSS.

380px

Tip: drag the width slider — stable keeps lines from reflowing as the box grows; balance rebalances every change.

Copy-ready CSS


  

Tip Apply text-wrap: balance only to short text (≤6 lines). Browsers cap the algorithm — too long and it silently falls back to wrap. For paragraphs, use pretty instead.

What each value does

All values are progressive enhancements — unsupported browsers fall back to wrap with no JS shim needed.

Copied!