Sanitize SVG
Strip scripts, event handlers and external references from an SVG so it is safe to serve or embed. The drawing itself comes out unchanged. Free, private, processed in memory.
Complete the security check to begin
An SVG is a document, and documents can be told what to do
Most file uploads are treated as data. You accept a JPEG, you store it, you serve it back, and there is nothing inside it that a browser will act on. SVG breaks that assumption. It is XML, the browser parses it as a document, and the specification gives that document real capabilities: it can define a script, it can attach a handler to a shape so that hovering over it triggers code, it can open a window onto embedded HTML, and it can point at resources living on other servers.
Whether those capabilities are exercised depends on how the file ends up being used. Inside an img tag the browser renders it in a restricted mode and scripts stay dormant. Inlined into a page, or opened at its own URL, it is a full document running in your site's origin. The trouble is that the decision about how to embed a file is usually made months after the decision to accept it, in a different part of the codebase, by someone who is thinking about layout rather than about what the file might contain.
So the file is cleaned rather than the embedding restricted. The document is parsed, checked against a list of what a drawing is allowed to contain, and written out again from the parsed structure. Anything that was not on the list is simply not there in the output.
- Rebuilt from a parse tree against an allowlist, so an unrecognised vector fails closed
- Scripts removed, including namespaced spellings a text-matching cleaner would miss
- Every event-handler attribute removed, and animation cannot put one back
- Embedded HTML, iframes and media elements removed
- Entity and DOCTYPE declarations handled at the parser, closing file-read and expansion attacks
- External references removed, so the drawing cannot report who viewed it
- Shapes, paths, text, gradients, filters and animation preserved - verified pixel for pixel
- A report of what was found, rather than a bare claim of success
If the drawing does not need to scale, converting it away from XML settles the matter completely - SVG to PNG gives you pixels with no document behind them. For the same problem in a different format, see Sanitize PDF.
If you are deciding how to handle SVG uploads in your own application, this guide covers the serving side - why the same file is harmless in one context and dangerous in another, and which common defences do not actually defend anything.
A converter built around your privacy
Most online tools upload your files to a server, keep them for days, and may mine them for AI training or resale. PrivConvert was built the opposite way - around your privacy.
Your files are handled entirely by automated code. No staff, partner or AI model ever reads, stores or trains on your data.
Files are processed in volatile memory (RAM) and purged the instant your download is ready - nothing is ever written to disk, cached or backed up.
Every upload and download is protected with TLS 1.3, so your file cannot be intercepted on the way to the server or back to you.
Convert instantly with no sign-up, no email and no profiling cookies. We never build a profile around you or the files you convert.
Built for people who value their privacy
Thousands of people trust PrivConvert with their files because privacy here is structural - enforced by how the service runs, not just promised.