CSS word-break Property Explained
What the CSS word-break property does, with an example.
Published November 5, 2026
word-break controls where lines may break inside words: normal, break-all (break anywhere) or keep-all (no breaks in CJK text). overflow-wrap: anywhere is often the better tool for long strings.
How it works
Use overflow-wrap: break-word or anywhere to wrap long URLs without breaking normal words. break-all breaks any word to fit and is aggressive.
hyphens: auto adds hyphenation for readable text.
Values and effects
word-break: normal; → default rules
word-break: break-all; → break at any character
word-break: keep-all; → no breaks in CJK
Practical examples
Long URLs
.content { overflow-wrap: anywhere; }Narrow table cells
td { word-break: break-word; }Hyphenation
p { hyphens: auto; }Common mistakes
- Using break-all for normal text (hurts readability).
- Not setting lang for hyphenation.
- Long strings overflowing flex items.
Key takeaways
- word-break in one line: word-break controls where lines may break inside words: normal, break-all (break anywhere) or keep-all (no breaks in CJK text).
- Inspect it live in DevTools → Styles.
- Test across browsers and screen sizes.
FAQ
word-break vs overflow-wrap?
overflow-wrap only breaks when needed; word-break: break-all breaks eagerly.
Is word-break supported in all browsers?
Yes in all modern browsers; check caniuse.com for edge cases.