Skip to main content

SVG to React Converter

Convert SVG code to React components instantly.
Paste your SVG and get a ready-to-use component.

React component will appear here...

What this tool does

Converts Attributes

Transforms SVG attributes to JSX format: stroke-width becomes strokeWidth, class becomes className

Adds Props Spreading

Automatically adds {...props} to the SVG element so you can pass custom attributes like className, style, etc.

TypeScript Support

Generates properly typed components using React.SVGProps<SVGSVGElement> for full type safety

Common Attribute Conversions

classclassName
stroke-widthstrokeWidth
fill-rulefillRule
clip-pathclipPath
stroke-linecapstrokeLinecap
stroke-linejoinstrokeLinejoin
xlink:hrefxlinkHref
xmlns:xlinkxmlnsXlink