Text & code · runs locally
SVG to JSX converter
Paste SVG markup, get React-ready JSX — className, camelCase attributes, style objects, comments, and an optional exported component.
How to use this tool
- 1Paste the SVG
From your design tool, an icon set, or the source of an illustration — comments, styles and namespaces are all handled.
- 2Choose the shape
Export just the fragment, or wrap it in export default function Icon(props) {…} with the <svg {...props}> spread in place.
- 3Copy Icon.jsx
The result drops straight into a React/Next project — no hand-fixing className or stroke-width by hand.
This page has no server behind it. Files are read, changed and re-built by your own browser — then they disappear when you close the tab. That's the whole privacy policy, applied.
Questions people actually ask
What about data-* and aria-* attributes?
They pass through untouched, exactly as React expects. Everything else hyphenated (stroke-width, clip-path, xlink:href…) is camelCased or mapped to its JSX prop.
Is the output a valid component?
Yes — with the wrap option on, the SVG is indented inside an exported function component and spreads props onto the root <svg>, so consumers can pass className, aria-label and style.