CSS: word-break

By Xah Lee. Date: . Last updated: .

word-break

word-break CSS property specifies how line breaks should occur within text, to prevent content overflow in narrow box.

🟢 TIP: if your content does not contain Chinese, you should use CSS: overflow-wrap instead.

word-break: normal

Uses default line breaking rules (respects natural word boundaries).

word-break: break-all

Breaks words at any character to prevent overflow, even in the middle of words.

This does not apply to Chinese characters. They can break between characters by default.

word-break: keep-all

Do not break words between Chinese characters. (in Chinese, Japanese, Korean). Punctuation and spaces still break.

Example. Normal:

师徒四人刚离开西梁女国(女王看上唐僧想招驸马)。孙悟空和猪八戒用定身法把女王和众女官定住,正要惩治这些纠缠的“妇女”时,突然刮起一阵怪风。沙僧一回头,唐僧已被一个女子用旋风摄走了!这个女子,正是后来大名鼎鼎的毒敌山琵琶洞蝎子精(她变化为美女,尾巴藏着剧毒钩)。

with word-break: keep-all:

师徒四人刚离开西梁女国(女王看上唐僧想招驸马)。孙悟空和猪八戒用定身法把女王和众女官定住,正要惩治这些纠缠的“妇女”时,突然刮起一阵怪风。沙僧一回头,唐僧已被一个女子用旋风摄走了!这个女子,正是后来大名鼎鼎的毒敌山琵琶洞蝎子精(她变化为美女,尾巴藏着剧毒钩)。

word-break: auto-phrase (Experimental. 2026-07-17)

Improves word breaks by avoiding splits in natural phrases based on language analysis.

word-break: break-word

The break-word value is deprecated.

it recommended to use overflow-wrap: anywhere combined with word-break: normal

CSS. overflow, line wrap