coderef

overflow-wrapBaseline · Widely available

The overflow-wrap CSS property breaks a line of text onto multiple lines inside the targeted element in an otherwise unbreakable place to prevent overflow. The legacy property is word-wrap.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Oct 2, 2018. Widely available since Apr 2, 2021.

Browser support

DesktopChrome
1–22Not supported
23+Supportedsince Nov 6, 2012
Current: 155
Edge
12–17Not supported
18+Supportedsince Oct 2, 2018
Current: 154
Firefox
1–48Not supported
49+Supportedsince Sep 20, 2016
Current: 157
Safari
1–6Not supported
7+Supportedsince Oct 22, 2013
Current: 27
MobileChrome Android
18–18Not supported
25+Supportedsince Feb 27, 2013
Current: 155
Firefox Android
4–48Not supported
49+Supportedsince Sep 20, 2016
Current: 157
Safari iOS
1–6Not supported
7+Supportedsince Sep 18, 2013
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: overflow-wrap.

Feature detection

CSS · check before using
@supports (overflow-wrap: initial) {
  /* styles that rely on overflow-wrap */
}

/* or in JavaScript */
if (CSS.supports("overflow-wrap", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (4). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
overflow-wrap231849725497
overflow-wrap.anywhere80806515.4806515.4
overflow-wrap.break-word231849725497
overflow-wrap.normal231849725497