Convert SVG markup to React-compatible JSX instantly. Transforms class to className, inline style strings to JavaScript objects, kebab-case attributes to camelCase, ensures proper self-closing tags, and removes xmlns attributes. Optionally wrap output in a React component with TypeScript and memo support. Free, private, runs entirely in your browser.
Automatically converts class to className and all kebab-case SVG attributes like stroke-width, fill-opacity, and clip-path to their camelCase JSX equivalents.
Converts inline style strings to JavaScript style objects with camelCased property names and proper value types, ready for React rendering.
Optionally wrap converted JSX in a full React component with import statements, props spreading, TypeScript types, and React.memo for performance.
Everything runs in your browser using JavaScript. No data is sent to any server. Your SVG content stays completely private on your machine.
When using SVG icons and graphics in React applications, you cannot simply paste raw SVG markup into your JSX components. React's JSX syntax requires specific changes: class must become className, inline style strings must be JavaScript objects, and hyphenated SVG attributes like stroke-width and fill-opacity must use camelCase (strokeWidth, fillOpacity). This tool automates all of those transformations instantly.
style="fill:red;stroke-width:2" becomes style={{ fill: 'red', strokeWidth: 2 }}.<path></path> become <path />.xlink:href becomes xlinkHref.style="fill: red; stroke-width: 2" are converted to JSX style objects like style={{ fill: 'red', strokeWidth: 2 }}. CSS property names are automatically camelCased and numeric values are converted to numbers where appropriate.
Check out our other free developer tools. Convert HTML to JSX, format JSON, generate TypeScript types, and more -- all from your browser.