The overflow-wrap property controls whether the browser may insert line breaks inside an otherwise unbreakable string — such as a long word or URL — so the text fits its line box instead of overflowing.
The initial value is normal, which only breaks at normal points like spaces. Use break-word or anywhere when a whole word cannot fit on one line. Unlike word-break, overflow-wrap breaks only when that overflow would otherwise happen.
Baseline · Widely available.
Not deprecated. Standard-track CSS Text property. Legacy alias:word-wrap began as a non-standard Microsoft name and is now an alias of overflow-wrap — prefer overflow-wrap in new CSS.
overflow-wrap is a browser CSS property for text wrapping. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
overflow-wrap
break-word is broadly supported (including IE via the word-wrap alias era). anywhere needs Chrome 80+, Firefox 65+, Safari 15.4+, Edge 80+.
97%break-word support
Google Chrome23+ · anywhere 80+
Full support
Mozilla Firefox49+ · anywhere 65+
Full support
Apple Safari7+ · anywhere 15.4+
Full support
Microsoft Edge18+ · anywhere 80+
Full support
Opera12.1+ · anywhere 67+
Full support
Samsung Internet4+ · anywhere 13+
Full support
Internet Explorerword-wrap / break-word
Partial
overflow-wrapWidely supported
Bottom line: Safe to use break-word in production. Use anywhere when you need modern min-content behavior. Prefer overflow-wrap over the legacy word-wrap name. It is not a runtime API.
Remember
Key Takeaways
Role: allow soft breaks inside long words or URLs so they fit the line box.
Initial value:normal. Long unbroken strings can overflow a narrow box.
Common pick:break-word for cards, sidebars, and long links.
anywhere vs break-word: similar wrapping; anywhere also affects min-content sizing.
One line: use break-word when a whole word cannot fit — it wraps only to stop overflow.
Frequently Asked Questions
It controls whether the browser may break an otherwise unbreakable string, such as a long word or URL, so the text fits inside its line box instead of overflowing horizontally.
The initial value is normal. Lines break only at normal points such as spaces, so a very long word can stick out of a narrow box.
Both can break long strings to prevent overflow. anywhere also counts those soft wrap opportunities when calculating min-content size; break-word does not.
overflow-wrap breaks a word only when that whole word cannot fit on a line by itself. word-break can force breaks more aggressively, depending on its value.
word-wrap is a legacy alias for overflow-wrap. Prefer overflow-wrap in new CSS. Older content may still use word-wrap for compatibility.
It is Baseline Widely available. break-word works broadly, including Internet Explorer. anywhere needs Chrome 80+, Firefox 65+, Safari 15.4+, or Edge 80+. It is a browser CSS property, not a Node.js feature.