SVG TO JSX
Convert SVG to React JSX/TSX, Vue SFC, or Preact. Attribute normalization, currentColor, SVGO optimization.
COMPONENT
SVG INPUT
REACT TSX OUTPUT
Paste SVG input to see the converted component
What gets converted
class→classNamestroke-width→strokeWidthfill-rule→fillRulexlink:href→href- All SVG hyphenated attrs → camelCase
- Comments & XML declarations removed
{...props}spread added to root
Output formats
- JSX — React component with PropTypes
- TSX — Typed with React.SVGProps<SVGSVGElement>
- Vue SFC — Template + script setup, v-bind="$attrs"
- Preact — Preact/compat import, JSX.SVGAttributes
Related tools
- SVG Optimizer — Compress before converting
- JSON to TypeScript — Type generation