Chrome 158 reached the Stable channel on 17 November 2026, and with it XSLT stops working in Chrome for everyone except sites in the Origin Trial or covered by an Enterprise Policy. If your site serves XML that a browser turns into HTML with an XSL stylesheet, such as a styled RSS feed, a sitemap viewer or a device status page, visitors on Chrome now see raw XML or a warning instead. This guide explains exactly what was removed, how to find XSLT usage, and four ways to migrate, with working code.
Sources: Chrome’s official Deprecating and removing XSLT guide and the Chrome 158 release notes.
What exactly was removed?
Two browser features are affected:
- The
XSLTProcessorJavaScript class (new XSLTProcessor()). - The XSLT processing instruction in XML documents:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="feed.xsl"?>
<rss version="2.0">...</rss>
What is not removed:
- XML itself. Chrome still parses and displays XML, and
DOMParserstill works. - Styling XML with CSS through the processing instruction:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="styles.css"?>
<root>
<item>Content here</item>
</root>
The timeline
- Chrome 158 (17 Nov 2026): XSLT stops working on Stable, except for Origin Trial and Enterprise Policy participants.
- Chrome 176 (17 Aug 2027): the Origin Trial and Enterprise Policy stop working, and XSLT is disabled for everyone.
Google says Firefox and WebKit have also indicated plans to remove XSLT, so this isn’t a Chrome-only problem to work around.
Why is it going?
Chrome’s guide cites serious security issues in the ageing libxslt library and very low usage: about 0.02% of page loads use XSLT at all, and less than 0.001% use XSLT processing instructions. Chrome also plans to move XML parsing from libxml2 to a memory-safe parser written in Rust, a change that should be invisible to developers.
Step 1: Find out whether you use XSLT
Search your codebase and served files:
grep -rniE "xml-stylesheet[^>]*text/xsl|XSLTProcessor|\.xslt?\b" \
--include=*.{xml,xsl,xslt,html,js,ts,php,py} .
Common hiding places are RSS/Atom feeds, XML sitemaps with a “pretty” viewer, generated reports, and admin pages of routers, printers or IoT devices.
You can also detect usage in the field with the Reporting API, which reports deprecations from real visitors:
<script>
new ReportingObserver((reports) => {
for (const report of reports) {
if (report.body.id === "XSLT") {
navigator.sendBeacon("/xslt-usage", JSON.stringify({
url: location.href,
message: report.body.message,
}));
}
}
}, { types: ["deprecation"], buffered: true }).observe();
</script>
Enterprise admins can use Chrome’s Legacy Technology Report to collect the same information across managed browsers.
Step 2: Choose a migration path
Option 1: Transform on the server (best long-term fix)
Do the XSLT transform once on the server and send HTML to the browser. The browser then has nothing to remove. In PHP, the xsl extension does this:
<?php
// feed-view.php: renders feed.xml as HTML on the server
$xml = new DOMDocument();
$xml->load(__DIR__ . '/feed.xml');
$xsl = new DOMDocument();
$xsl->load(__DIR__ . '/feed.xsl');
$proc = new XSLTProcessor(); // PHP's server-side processor, unaffected
$proc->importStylesheet($xsl);
header('Content-Type: text/html; charset=utf-8');
echo $proc->transformToXML($xml);
In Python, lxml does the same:
from lxml import etree
dom = etree.parse("feed.xml")
transform = etree.XSLT(etree.parse("feed.xsl"))
html = str(transform(dom))
with open("public/feed.html", "w", encoding="utf-8") as f:
f.write(html)
Keep serving the raw XML at the original URL for machines such as feed readers, and serve the HTML version to people.
Option 2: Render in JavaScript with fetch and DOMParser
If you only used XSLT to turn some XML into a list on a page, plain JavaScript is simpler and safer:
<ul id="posts"></ul>
<script type="module">
const res = await fetch("/feed.xml");
const xml = new DOMParser().parseFromString(await res.text(), "application/xml");
const list = document.getElementById("posts");
for (const item of xml.querySelectorAll("item")) {
const li = document.createElement("li");
const a = document.createElement("a");
a.href = item.querySelector("link")?.textContent ?? "#";
a.textContent = item.querySelector("title")?.textContent ?? "Untitled";
li.append(a);
list.append(li);
}
</script>
Using textContent and createElement instead of innerHTML keeps feed content from injecting markup into your page. If you control the API, switching the endpoint to JSON makes this even simpler.
Option 3: Use the polyfill to keep things working
Chrome’s guide points to a WebAssembly-based XSLT polyfill that replaces the native XSLTProcessor, so existing JavaScript keeps working:
<script src="xslt-polyfill.min.js"></script>
<script>
const processor = new XSLTProcessor();
processor.importStylesheet(xsltDoc);
const fragment = processor.transformToFragment(xmlDoc, document);
document.body.append(fragment);
</script>
For XML files that use the processing instruction, add one line inside the root element. It loads the polyfill, which finds the xml-stylesheet instruction and replaces the document with the transformed result:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="feed.xsl"?>
<rss version="2.0">
<script src="/js/xslt-polyfill.min.js" xmlns="http://www.w3.org/1999/xhtml"></script>
<channel>...</channel>
</rss>
Chrome’s guide notes this shouldn’t affect feed readers, because the <script> is a direct child of the root element. Download the polyfill from the link in the official guide and host it yourself rather than hot-linking it.
Option 4: Use a full XSLT library in the browser
If you depend on advanced XSLT, Chrome’s guide mentions Saxonica’s JavaScript implementation, which supports XSLT 3.0, far beyond the XSLT 1.0 that browsers shipped.
Special case: RSS and Atom feeds
Many blogs used XSLT so that people who clicked an RSS link saw a readable page instead of raw XML. The recommended HTML approach is to stop linking to the feed as a visible page and advertise it in the <head> instead:
<link rel="alternate" type="application/rss+xml"
title="My Blog feed" href="https://example.com/feed.xml">
Feed readers find the feed when someone pastes your site URL, and humans see your normal HTML pages. If you still want a pretty view for people who open the feed directly, use the one-line polyfill from Option 3.
Special case: devices you can’t update
Some embedded devices serve XML with XSLT for their admin pages, and their firmware may never be updated. Chrome points users to an XSLT polyfill extension in the Chrome Web Store. When XSLT is disabled, Chrome shows a warning banner that links to an extension search. Organisations can also keep XSLT working through Chrome’s Enterprise Policy, but only until Chrome 176.
Migration checklist
- Search code and served files for
text/xslandXSLTProcessor. - Add a
ReportingObserverto catch real-world usage. - Move transforms to the server, or rewrite them with
fetch+DOMParser. - Use the polyfill only as a bridge, and self-host it.
- Add
<link rel="alternate">for feeds. - Test in Chrome 158, and plan for Firefox and Safari to follow.
Takeaway
From today, Chrome no longer runs XSLT in the browser. XML and XML-with-CSS still work, so the fix is to stop relying on the browser to transform XML. Render HTML on the server or in JavaScript, use the polyfill only as a short-term bridge, and finish before the Origin Trial and Enterprise Policy end with Chrome 176 in August 2027.
