← All XML tools
XML Tools

XSLT Tester

Paste XML and an XSLT stylesheet, run the transformation, and see the result — raw or as a sandboxed HTML preview. Runs entirely in your browser using its built-in XSLT engine.

Uses your browser's native XSLT processor, which supports XSLT 1.0. There is no built-in browser support for XSLT 2.0 or 3.0 — see Limitations below.

Use the tool ↓
XML input
0 chars
XSLT stylesheet
0 chars
Output
0 chars
Paste XML and an XSLT stylesheet, then run the transformation.

About this tool

XSLT (Extensible Stylesheet Language Transformations) is a language for turning one XML document into another document — often HTML for display, sometimes a different XML shape, sometimes plain text. A stylesheet is itself an XML document made of templates: each template says "when you find something matching this pattern, output this." The engine walks your source XML, matches nodes against your templates, and builds the output as it goes.

This tool runs the transformation using the XSLTProcessor built into your browser — the same engine your browser would use if it encountered an XML document with an <?xml-stylesheet?> processing instruction pointing at an XSLT file. That means transformation happens entirely client-side, with no server involved, but it also means the tool inherits whatever XSLT version and feature set your specific browser ships. See Limitations below for exactly what that means in practice.

Output preview

If your stylesheet's output looks like HTML, a Preview tab appears alongside Raw so you can see it rendered rather than just as markup text. The preview renders inside a sandboxed <iframe> with scripting disabled, so any <script> tags your stylesheet happens to output will not execute — this tool never runs arbitrary code from your XML or XSLT, even in the preview.

How to use it

  1. 01

    Paste, upload, or drop your XML and XSLT

    Each panel accepts a file drop or the Upload button, or you can paste directly.

  2. 02

    Click "Run transformation"

    Or press Ctrl/Cmd + Enter anywhere in the tool.

  3. 03

    Check the output

    Switch between Raw and Preview (when available) to see the result as text or rendered HTML.

  4. 04

    Copy or download the result

    Copy to your clipboard or download the raw output as a file.

Common XSLT patterns

xsl:for-each
<xsl:for-each select="order">
  <tr>
    <td><xsl:value-of select="@id"/></td>
  </tr>
</xsl:for-each>
xsl:value-of
<xsl:value-of select="customer"/>
<xsl:value-of select="@id"/>
xsl:if
<xsl:if test="qty > 1">
  (multiple)
</xsl:if>
xsl:choose / xsl:when / xsl:otherwise
<xsl:choose>
  <xsl:when test="@price > 100">
    Expensive
  </xsl:when>
  <xsl:otherwise>
    Affordable
  </xsl:otherwise>
</xsl:choose>

Common use cases

Rendering XML as an HTML report

Turn a raw XML export into a readable table or page for someone who isn't going to read tags.

Reshaping XML into another XML format

Transform between two different XML schemas — a common step in system integrations.

Debugging a stylesheet

Iterate on a real XSLT file against real data without a build step or command-line tool.

Learning XSLT

See exactly how changing a template or an XPath expression changes the output, immediately.

Generating plain-text output

Use <xsl:output method="text"/> to produce fixed-format text or CSV-like output from XML.

Reviewing a legacy stylesheet

Check what an inherited XSLT file actually produces before relying on it in a pipeline.

Limitations

  • XSLT 1.0 only. This tool uses your browser's built-in XSLTProcessor, and no major browser implements native XSLT 2.0 or 3.0 support. Features from later versions — like xsl:function, grouping with xsl:for-each-group, or the expanded XPath 2.0/3.0 function library — are not available here.
  • Error messages come from the browser, and they're often minimal. Unlike a dedicated command-line XSLT processor (such as Saxon or xsltproc), browser XSLT engines frequently report only that a transformation failed, without a precise line number or a detailed description of which template or XPath expression caused it. This tool surfaces whatever the browser provides and adds guidance for the most common causes, but it can't manufacture diagnostic detail the browser itself doesn't return.
  • Behavior can vary slightly by browser. Since the transformation runs on your browser's own engine, extremely edge-case stylesheets could theoretically behave slightly differently between browsers. Mainstream XSLT 1.0 features are consistently supported across current Chrome, Firefox, and Safari.
  • xsl:output method="text" and other non-HTML output is supported, but very unusual output shapes (e.g. output that isn't well-formed XML and also isn't declared as text) may not serialize back to a string exactly the way a dedicated processor would.

Troubleshooting

  • "Invalid XML" / "Invalid XSLT" — one of your two inputs isn't well-formed. Both XML and XSLT are XML documents, so both need valid tag nesting and closing. Use the XML Formatter & Validator if you need exact line/column detail.
  • "Transformation failed" with no further detail — this is the browser XSLT engine's own limited error reporting, not something this tool is withholding. Common causes: no xsl:template matches your document's root, a namespace mismatch between your XML and your match/select patterns, or an XPath expression referencing an element that doesn't exist in your XML.
  • Output is empty but no error appeared — this usually means your templates matched something, but produced no output for it (an empty xsl:template, or a select that matched zero nodes). Check that your XPath expressions actually match elements present in your XML.
  • Preview tab doesn't appear — the Preview tab only shows up when the output looks like HTML. If your stylesheet outputs XML or plain text, check the Raw tab instead.
  • Namespace-related mismatches — if your source XML declares a default namespace, your stylesheet's match and select patterns need to account for it (typically by declaring and using a matching namespace prefix in the stylesheet) or they won't match anything.

Frequently asked questions

What XSLT version does this support?

XSLT 1.0, via your browser's built-in XSLTProcessor. No current mainstream browser has native support for XSLT 2.0 or 3.0, so this tool doesn't either — it isn't a missing feature so much as a boundary of what's available client-side without adding a large external engine.

Why is the error message so vague sometimes?

Browser XSLT engines generally report transformation failures with far less detail than dedicated processors like Saxon or xsltproc — often no line number and only a generic failure message. This tool shows exactly what the browser reports, plus guidance on the most common causes, rather than inventing detail that isn't actually available.

Is my XML or XSLT sent to a server?

No. Parsing and transformation both happen locally in your browser, using its built-in XML and XSLT engines. Nothing is uploaded.

Can the output execute JavaScript?

No. The Preview tab renders inside a sandboxed iframe with scripting disabled, so even if your stylesheet's output includes a <script> tag, it will not run.

What's the difference between Raw and Preview?

Raw shows the exact text the transformation produced. Preview (available only for HTML-like output) renders that text visually, the way a browser would display the resulting page.

Can I transform XML into another XML format, not just HTML?

Yes — set <xsl:output method="xml"/> (or omit it, since XML is the default) and view the result in the Raw tab.

Does this validate my XSLT against the XSLT 1.0 specification?

It checks that your stylesheet is well-formed XML and that the browser can import and run it, and it will surface whatever error the browser's engine returns. It doesn't do independent, spec-level validation beyond what the browser's own processor performs.

Why did my transformation produce no visible change?

Check that your stylesheet has a template matching your document's actual root element and namespace, and that any select/match XPath expressions reference elements that exist in your XML — a common cause is a namespace declared on the XML that isn't accounted for in the stylesheet's patterns.

Is there a file size limit?

No hard limit is enforced, but very large XML or XSLT files will take longer for the browser to parse and transform.

Related tools