SVG to React Component
Paste SVG, get a ready-to-import JSX or TSX component.
or drop a file / paste code below
React component
Output appears here
How it works
- 1Paste SVG code or drop an .svg file.
- 2Toggle TypeScript output and set the component name.
- 3Copy the generated component into your codebase.
Free, no signup, no watermark — everything runs locally in your browser, so your files never leave your machine.
Frequently asked questions
What gets converted?
Attributes are camelCased (stroke-width → strokeWidth), class → className, and {...props} is spread on the root so you can pass size and color.
Should I optimize the SVG first?
Yes — run it through the SVG Optimizer first for a smaller, cleaner component. The two tools are one click apart.