FreeDev Tools

SVG to JSX Converter

Convert SVG markup into a React functional component with camelCase attributes and props spread.

When using SVG icons in React, you need to convert SVG attributes to their JSX equivalents. Hyphenated attributes like stroke-width become strokeWidth, and fill-rule becomes fillRule. This converter wraps the SVG in a reusable React functional component and spreads props onto the root svg element for easy customization.

Frequently Asked Questions

Hyphenated SVG attributes like stroke-width, fill-rule, clip-path are converted to camelCase JSX equivalents (strokeWidth, fillRule, clipPath).