SVG to React Component
Paste an SVG and get a ready-to-use React component. The converter transforms SVG attributes to JSX (stroke-width → strokeWidth, fill-opacity → fillOpacity), adds prop spreading ({...props}), wraps the SVG in a functional component, and can optionally convert to React Native or Vue format.

What it does
- ▸Converts SVG to a React functional component with TypeScript-compatible JSX
- ▸Transforms SVG attributes to camelCase (stroke-width → strokeWidth)
- ▸Adds prop spreading ({...props}) for size, color, and other overrides
- ▸Optionally converts to React Native format (using react-native-svg)
- ▸Optionally converts to Vue single-file component format
- ▸Handles SVG gradients, filters, masks, and other advanced features
Use cases
- ▸Converting an SVG icon from Figma into a React component
- ▸Creating a reusable React Native icon from an SVG
- ▸Generating Vue components from SVG illustrations
- ▸Building an icon system with React components from SVG files
How it works
Paste your SVG markup into the input pane
Choose React, React Native, or Vue output format
The tool converts attributes, adds prop spreading, and wraps in a component
Copy the component code into your project
Frequently asked questions
1How does prop spreading work?
The component accepts {...props} which lets you pass any SVG attribute as a prop. For example, <MyIcon width={24} height={24} fill="red" /> overrides the SVG's default dimensions and fill color.
2What's different about React Native output?
React Native doesn't support SVG natively. The output uses react-native-svg components (Svg, Path, Circle, Rect, etc.) instead of raw SVG elements. You need react-native-svg installed in your project.
3Does it handle SVGs with gradients and filters?
Yes. Gradients (linearGradient, radialGradient), filters (feGaussianBlur, feColorMatrix), masks, and clip paths are all converted with proper camelCase attributes. The component structure preserves these definitions.
Related tools

SVG to CSS
Turn an SVG into a CSS background-image data-URI snippet

SVG Optimizer
Optimize SVG files with SVGO — strip metadata, minify paths

HTML to JSX
Convert HTML markup to React JSX — attributes, inline styles, SVG props, entities, fragments

Base64 Image Encode/Decode
Convert images to Base64 data URIs and back
Use SVG to React Component offline in Devinity
All 95 tools run locally on your Mac. No internet required, no data sent to servers.
Download Devinity →