SVG to JSX/TSX Converter - React Component Generator
Convert raw SVG code into clean React/TypeScript components with proper attribute casing and prop support.
SVG Input
Paste your SVG code above. The converter will handle kebab-case to camelCase conversion.
๐ก How it works
This tool converts SVG attributes to React props with proper camelCase (e.g., stroke-width โ strokeWidth). It also handles self-closing elements, style objects, and generates TypeScript interfaces when enabled.
TypeScript Output
Copy this code into your React project. Make sure to install required dependencies if using TypeScript.
๐ Conversion Details
- โข SVG attributes converted to camelCase React props
- โข Self-closing elements properly handled
- โข Style strings converted to style objects
- โข TypeScript interfaces generated when enabled
- โข Configurable component props (width, height, color, className)
- โข Support for both default and named exports
โก Automatic Conversion
Convert SVG attributes to React props with proper camelCase naming (stroke-width โ strokeWidth).
๐ TypeScript Support
Generate TypeScript interfaces with proper type definitions for your React components.
๐ Privacy First
All processing happens locally in your browser. Your SVG code never leaves your device.