Turn SVG into clean HTML, JSX, React, Vue, Svelte or CSS code
Drop an SVG to turn it into code
Get clean HTML, JSX, React, Vue, Svelte or CSS. Or press Ctrl/⌘ V to paste a file or code. Nothing leaves your browser.
Convert SVG to code as inline HTML, a JSX snippet, a React or TypeScript component, a Vue or Svelte component, or a CSS rule with a data URI.
Editor metadata, comments and leftovers from Inkscape, Sketch and Illustrator are removed, and attributes like stroke-width become strokeWidth for React.
Switch fills and strokes to currentColor, set the size to 1em, spread props on the root, or minify the result. It all runs in your browser.
Need your SVG as code you can drop into a project? This SVG to code converter reads your file and writes it out as clean HTML, JSX, a React or TypeScript component, a Vue or Svelte component, or a CSS rule. It removes editor clutter, converts attributes to the form each framework expects, and lets you switch colors to currentColor so icons follow your text color. Upload one SVG or a whole set, copy the result, or download it as a file or ZIP. Your files never leave your device.
Turn exported SVGs into typed React components with props spread on the root, ready to import and style.
Get tidy inline markup so icons and logos can be styled with CSS and load without an extra request.
Generate single-file components. Style rules inside the SVG are moved into the component's style block where each framework needs them.
Create a CSS rule with a data URI to use an SVG as a background image, or as a mask that follows the text color.
Turn an SVG file into code in three steps:
With currentColor on, fills and strokes take the text color, so one icon works in light mode, dark mode and hover states.
Fixed width and height attributes fight your CSS. Use 1em to scale with text, or Remove and size the icon with a class.
A viewBox lets the SVG scale. If yours is missing, the tool adds one from width and height when you remove the size.
Background images cannot use currentColor. The Mask style paints the shape with the text color instead.
Warnings tell you when something was removed or moved, such as scripts, editor data or style rules.
More free browser-based vector converters and editors in MintConvert.
Generate crisp vector QR codes with custom shapes, colors and logos
Generate crisp vector barcodes (CODE128, EAN-13, UPC, Code 39) as SVG
Encode SVG files to Base64 Data URIs, CSS rules, or decode Base64 back to SVG
Export 1x–8x high-DPI transparent PNGs from vector files
Trace PNG, JPG and WebP images into clean, scalable SVG paths
Convert SVG to PNG, JPG, WebP or ICO in one workspace