CSS overflow-wrap Property
Description
The overflow-wrap property controls whether the browser may break within an otherwise unbreakable string to prevent it from overflowing its container. It governs visual line-breaking behavior for long words, URLs, or continuous character sequences that would otherwise force a line box to grow or produce horizontal scrolling. By allowing breaks at appropriate points, it helps maintain layout integrity in constrained, responsive, or narrow containers without changing the underlying text content.
How that breaking actually occurs is affected by other text-handling properties and layout context. For example, word-break determines the general algorithm of where breaks may be allowed (especially for CJK text and very long words), while white-space controls whether wrapping is permitted at all and whether sequences of spaces are collapsed or preserved. Hyphenation behavior from hyphens can combine with allowed break points to insert hyphen characters for readability, and when overflow strategies result in clipped or scrolled content the box-level overflow rules determine whether scrollbars, clipping, or visible overflow occur.
In practical terms, overflow-wrap is commonly used to prevent layout breakage caused by long, unbroken strings—such as URLs, long file names, or generated tokens—so text remains readable without horizontal scrolling. It operates at the inline formatting level, so its effects depend on the available line box width, the presence of inline elements, and any forced no-wrap rules nearby. It does not alter the semantic contents of the text; it only influences where the browser may place line breaks when constructing the layout.
Considerations when using it include readability (breaking words can make text harder to scan if overused), language specifics (word-break rules differ across scripts), and the visual impact of inserted hyphens or break points. When precise control over how and when breaking occurs is required, combine it thoughtfully with the other properties mentioned above and, when needed, with explicit soft-break characters (zero-width space, soft hyphen) inserted into the content to indicate preferred break opportunities.
Definition
- Initial value
- normal
- Applies to
- All elements
- Inherited
- Yes
- Computed value
- Specified value
- Animatable
- No
- JavaScript syntax
- object.style.overflowWrap
Interactive Demo
Syntax
overflow-wrap: normal | break-word
Values
- normalIndicates that lines may only break at normal word break points.
- break-wordIndicates that normally unbreakable words may be broken at arbitrary points if there are no otherwise acceptable break points in the line.
Example
Browser Support
The following information will show you the current browser support for the CSS overflow-wrap property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
