CSS line-clamp works in Chrome 14+, Edge 17+, Firefox 68+, Safari 5+, Opera 15+, and Samsung Internet 4+. Learn line-clamp browser support and quirks.

Prince Dewani
May 1, 2026
CSS line-clamp is a W3C CSS Overflow Module Level 4 property that limits text to a chosen number of lines, with an ellipsis at the cut-off. The -webkit-line-clamp form works in Chrome 14+, Edge 17+, Firefox 68+, Safari 5+, Opera 15+, and Samsung Internet 4+, while Internet Explorer 5.5 to 11 never added support.
This guide covers what CSS line-clamp is, the browsers that support it, how to use it, the difference between line-clamp and -webkit-line-clamp, and the known issues.
CSS line-clamp is a W3C property in the CSS Overflow Module Level 4 specification that limits a block container to a chosen number of visible lines. The browser truncates the overflowing content and adds an ellipsis at the cut-off. Most production sites also use the older -webkit-line-clamp form for wider engine support.
The -webkit-line-clamp form works in every modern desktop and mobile browser. Chrome 14+, Edge 17+ on Windows, Firefox 68+, Safari 5+ on macOS and iOS, Opera 15+, and Samsung Internet 4+ all enable it by default, while Internet Explorer 5.5 through 11 never received support.
Chrome supports -webkit-line-clamp by default from Chrome 14 on Windows, macOS, Linux, ChromeOS, and Android. The unprefixed line-clamp property also resolves on current Chrome through the same Blink rendering path, so a single rule with both forms covers every release from Chrome 14 forward.
Microsoft Edge supports -webkit-line-clamp by default from Edge 17 in legacy EdgeHTML builds and from Edge 79 in the Chromium-based releases that ship today. Edge 12 to 16 did not support it. Users on Windows 11 inherit the same -webkit-line-clamp behavior as Chrome because Edge runs on Blink.
Firefox supports -webkit-line-clamp by default from Firefox 68 on Windows, macOS, Linux, and Android. Mozilla added the WebKit-prefixed alias to fix layout breakage on sites that ship a single -webkit- prefixed clamp rule. Firefox 2 to 67 did not support line-clamp at all.
Safari supports -webkit-line-clamp by default from Safari 5 on macOS and from iOS 5 on iPhone and iPad. WebKit shipped the original implementation, so every modern Apple device renders the property correctly. Safari 3.1 to 4 on macOS and Safari on iOS 3.2 to 4.3 do not support it.
Opera supports -webkit-line-clamp by default from Opera 15 on desktop and from Opera Mobile 14 on Android. Opera 9 to 12.1 ran on the Presto engine and did not parse -webkit-line-clamp, but those builds offered a similar single-line truncation through the proprietary -o-ellipsis-lastline value for text-overflow.
Samsung Internet supports -webkit-line-clamp by default from version 4 on Galaxy phones and tablets. Every Samsung Internet release since then renders the property exactly like Chrome on Android because the browser shares the underlying Chromium engine.
The legacy Android Browser supported -webkit-line-clamp on Android 2.3 through 4.4.4. Modern Android Browser builds on Chromium 147 and later inherit the property from the system WebView. Apps that embed WebView on Android 5.0 and later pick up -webkit-line-clamp once the WebView updates past the same Chromium baseline.
Internet Explorer 5.5 through 11 do not support -webkit-line-clamp or the unprefixed line-clamp in any version. The Trident engine never received the property. Users on Windows who need line-clamp should switch to Microsoft Edge 79 or later, or to Chrome 14 or later.
Note: CSS line-clamp breaks across browsers when shipped without the -webkit- prefix. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!
CSS line-clamp needs four declarations working together to clamp text to a fixed number of lines. The pattern below works in every browser that supports -webkit-line-clamp, including Chrome 14+, Firefox 68+, and Safari 5+.
/* Three-line teaser that clamps in every -webkit-line-clamp browser. */
.teaser {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
line-clamp: 3;
overflow: hidden;
}Drop the four -webkit- declarations and the unprefixed line-clamp on the same selector, and any modern browser will clamp the text exactly as written.
The two properties exist for the same outcome but live in different specs and ship with different requirements. The table below contrasts them on the dimensions QA engineers and developers care about.
| Dimension | line-clamp | -webkit-line-clamp |
|---|---|---|
| Spec body | W3C CSS Overflow Module Level 4 | Apple proprietary, later aliased by W3C |
| Spec status | Working Draft | De facto standard across engines |
| Default browser support | Limited, still rolling out across engines | Chrome 14+, Edge 17+ and 79+, Firefox 68+, Safari 5+, Opera 15+, Samsung Internet 4+ |
| Required companion properties | None, works on its own once supported | display: -webkit-box, -webkit-box-orient: vertical, overflow: hidden |
| Production usage | Future-proofing alongside the prefix | Standard cross-browser pattern today |
| Internet Explorer support | Not supported | Not supported |
CSS line-clamp ships in every modern engine, but the way browsers parse and resolve it still has rough edges that hit production sites. Plan around these before you replace JavaScript-driven truncation with line-clamp.
In my experience, the silent failure that bites teams the most is forgetting display: -webkit-box: a -webkit-line-clamp: 3 rule on a plain block does nothing in Chrome or Safari, and the bug only shows up at QA on multiple devices.
All CSS line-clamp version numbers and platform notes in this guide come from these primary sources:
Did you find this page helpful?
More Related Hubs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance