React-safe attributes
Dashed SVG attributes such as stroke-width and fill-rule become strokeWidth and fillRule. class becomes className.
Free SVG utility
Turn SVG markup into a React-ready JSX component.
Why this tool exists
Raw SVG markup does not paste cleanly into JSX because React uses different attribute names. This converter handles the common syntax changes and wraps the result as a named component you can edit.
How to use it
Paste the export from Figma, Illustrator, or another vector editor.
Choose a valid PascalCase component name and whether the root should accept props.
Review the converted attributes and paste the component into your codebase.
Dashed SVG attributes such as stroke-width and fill-rule become strokeWidth and fillRule. class becomes className.
The output can include an exported function, a configurable component name, and spread props on the root SVG.
Decorative icons should be hidden from assistive technology. Meaningful graphics need a useful title or aria-label in your component.
SVGs with embedded styles, scripts, or tool-specific namespaces may still need a quick manual pass after conversion.
Keep working
Optimize and clean SVG files online for free. Remove comments, XML declarations, and extra whitespace to shrink markup without changing the design.
Replace fill and stroke colors in an SVG file online for free. Recolor individual colors or swap the whole palette — no install needed.
Convert SVG to a data URI or base64 string online for free. Embed SVGs directly in CSS, img tags, and HTML without a separate file.
Good to know
Convert the SVG to JSX with this tool, then paste the result into your React component. Attribute names like stroke-width become strokeWidth automatically.
No. This tool runs in your browser, so your SVG stays in the current tab and is not uploaded to GenSVG.
The tool does not add a watermark or a new license. Your right to use the result depends on the license and ownership of the source artwork you provide.