Unsanitized HTML parsing
Newly Available (since 2025-09-15)
Expected to be Widely Available on 2028-03-15
The Document.parseHTMLUnsafe() static method parses HTML into a DOM tree, much like the setHTMLUnsafe() DOM method inserts HTML into an existing tree. No sanitization applies, so never call it with user-provided strings.
Browser support
- Chrome 124 Released on 2024-04-16
- Chrome Android 124 Released on 2024-04-16
- Edge 124 Released on 2024-04-18
- Firefox 128 Released on 2024-07-09
- Firefox for Android 128 Released on 2024-07-09
- Safari 26 Released on 2025-09-15
- Safari on iOS 26 Released on 2025-09-15
MDN documentation
Specifications
- HTML (#dom-parsing-and-serialization), from HTML Workstream (WHATWG).
Usage (according to Chrome Platform Status)
~0.111% of page loads. More data at chromestatus.com.Web Platform Tests (WPT)
View the latest WPT test results for this featureView as JSON | Edit this feature | Report an issue | Web-features entry: source, dist