LLM Output XSS Tester
An LLM output XSS tester checks a model's Markdown answer for patterns that can attack readers once rendered as HTML: script tags, event handlers, javascript: or data: links, iframes and data-leaking remote images. This free scanner runs in your browser and never renders your input.
0 high, 1 medium, 0 info
- mediumRemote image with a query string
The browser requests this URL as soon as it renders. Data in the query string goes to that server with no click. This is the image-exfiltration pattern.

HTML an unsanitized renderer would insert (shown as text)
What does it check?
- High:
<script>,<iframe>,<object>,<embed>,<form>,<meta>and<base>tags;on…event handler attributes;javascript:andvbscript:URLs, including entity-encoded ones;data:URLs that are not plain images. - Medium: remote images (the exfiltration channel),
styleattributes and tags, SVG and form fields, and hidden Unicode tag characters. - Info: any raw HTML at all, and invisible characters such as zero width spaces.
Code blocks and inline code are skipped, because a Markdown renderer prints them as text. The collapsed box under the results shows the HTML that marked produces with no sanitizer. The marked README says plainly that marked does not sanitize its output and that you should run a sanitizer on the HTML.
Why scan model output at all?
A chatbot reads web pages, files and messages that an attacker can write. Text in them can steer the model into adding a payload to its answer. The OWASP Top 10 for LLM Applications (LLM05) calls this improper output handling, and the OWASP XSS Prevention Cheat Sheet covers the general defenses. Our article on rendering LLM Markdown output safely shows a real sanitizer run on these payloads, and the list of Markdown XSS test payloads gives you more to try.
From test to fix
This page finds problems. To fix them, convert the Markdown to sanitized HTML. Paste the same answer into the free playground to see what the TexToolsAI sanitizer returns, then read the API documentation to call it from your app. The Pro plan is ₹799 per month for 50,000 requests. Text also full of invisible characters? Run it through the AI text cleaner first.
Frequently asked questions
Is LLM output safe to render as HTML?
No. Treat it as untrusted input. A model can be tricked by text it reads into writing script tags, event handlers, javascript: links or tracking images. OWASP lists this as improper output handling (LLM05). Convert the Markdown to HTML, then sanitize it with an allow-list before you render it.
Does a clean result mean the answer is safe?
No. The tester is a checklist of known risky patterns, not a sanitizer and not a security audit. Attackers find new tricks, so always run a real sanitizer on the HTML, even when this page finds nothing.
Is the text I paste sent anywhere or rendered?
No. The scan runs in your browser and nothing is sent to a server or saved. The page never renders your input as HTML: the HTML output is shown as plain text in a read-only box, so a payload cannot run here.
Why are remote images flagged?
A browser loads an image as soon as it is shown, with no click. If a model is tricked into writing an image URL that contains chat data in the query string, that data goes to the image's server. Many sanitizers allow https images by default (sanitize-html did in our test), so you need your own rule for trusted image hosts.
Which Markdown rules does the tester use?
It reads Markdown with the marked library, with GitHub-Flavored Markdown turned on. Other renderers can treat edge cases differently, so test with the renderer you use.