SVG to React

Convert SVG code to React components. Automatically converts attributes to camelCase and generates TypeScript or JavaScript components.

Features

  • TypeScript support
  • Auto camelCase conversion
  • Props spreading
  • Clean component output
  • One-click copy
  • Preserves SVG structure

How to Use

  1. 1
    Paste your SVG code
  2. 2
    Set component name
  3. 3
    Choose TS or JS
  4. 4
    Click Convert
  5. 5
    Copy the component

Frequently Asked Questions

What attributes are converted?

All kebab-case attributes like stroke-width become strokeWidth. Class becomes className.

Can I customize the component?

Yes! Props are spread on the SVG element so you can pass className, onClick, etc.