Daily Tools (126)/React Ready

SVG to React JSX / TSX Converter

Convert raw SVG markup into a clean React JSX or TypeScript TSX component — automatically converting hyphenated attributes (`stroke-width` → `strokeWidth`), `class` → `className`, and inline `style` strings to objects.

Try next

How to use SVG to React JSX / TSX Converter

  1. 1Paste raw `<svg>...</svg>` code from Figma, Illustrator, or icon sets.
  2. 2Set component name and toggle TypeScript props (`SVGProps<SVGSVGElement>`).
  3. 3Copy the clean, ready-to-import React component.

Frequently Asked Questions

Does it convert inline style='fill:red' to React style objects?

Yes — inline CSS style declarations are parsed into camelCase JSX style objects.

Does it strip XML prologs and comments?

Yes — cleans `<?xml ...?>`, DOCTYPE, and editor comments automatically.