Is SVG preview rendering safe for untrusted SVG files?
Yes. SVG Optimizer strips script tags and inline event handlers and renders previews via isolated Blob URLs inside an <img> element rather than injecting raw HTML into the page.
Free tools for PDF, images, and code
Shrink SVG files with SVGO in your browser, convert to clean React JSX/TSX components, or rasterize crisp HiDPI PNGs.
GUIDE & SPECS // SVG OPTIMIZER & JSX/PNG
SVG Optimizer & JSX/PNG is a free browser-based developer utility on phil.on. Shrink SVG files with SVGO in your browser, convert to clean React JSX/TSX components, or rasterize crisp HiDPI PNGs. Built on standard Web APIs (TextEncoder, Web Crypto, Intl, jsdiff) for deterministic output. There is no sign-up, watermark, or file upload required.
FAQ // DEVELOPER
Yes. SVG Optimizer strips script tags and inline event handlers and renders previews via isolated Blob URLs inside an <img> element rather than injecting raw HTML into the page.
It converts class to className, transforms kebab-case and colon attributes like stroke-width and clip-rule to camelCase, converts inline style strings into JSX style objects, and optionally adds TypeScript SVGProps<SVGSVGElement>.
Yes. Switch to the PNG Export tab to render at 1x, 2x, 4x, or custom pixel dimensions, download the PNG, or pipe it straight into Image Compressor or Favicon Generator.