Convert SVG to a React Native component
React Native can't show an SVG file directly: it needs react-native-svg components. Drop SVG files or paste code and get a ready-to-use component — <path> becomes <Path>, <g> becomes <G>, gradients, clip paths and masks keep working, and <style> rules are moved onto the shapes because react-native-svg has no style sheets. Choose TypeScript, a 24 × 24 icon size, currentColor (the color prop then sets the icon color), memo and forwardRef, and convert a whole icon set into one ZIP with an index file.
How to use it
- 1
Drop SVG files or a folder, or paste SVG code.
- 2
Choose JSX or TSX and how the component is written: icon size, currentColor, memo, forwardRef, export style.
- 3
Copy a component, download it, or download every component with an index as a ZIP. Install react-native-svg in your app to use them.
Questions
What do I need in my app?
The react-native-svg package (npx expo install react-native-svg in Expo, or npm install react-native-svg). The components import Svg and the shapes they use from it.
What changes from the SVG?
Elements become react-native-svg components (path → Path, linearGradient → LinearGradient), attributes become camelCased props, xlink:href becomes href, and inline styles become props. Classes, data- and aria- attributes, <title> and <desc> are left out: React Native has no CSS or DOM for them.
What happens to <style> rules?
They're moved onto the shapes they style before conversion, so class-based colors still apply. Rules that can't be moved (:hover, @media) can't work in React Native and are left out — the converter tells you when that happens.
How do I change the icon's color?
Turn on Use currentColor, then set the color prop: <Icon color="tomato" />. Without it, pass fill or stroke props, or edit the colors in the code.
Are filters supported?
The filter effects react-native-svg renders (Gaussian blur, offset, flood, blend, color matrix, composite, merge, drop shadow) are kept. Others render nothing in React Native, so they're left out and listed.
Is my SVG uploaded?
No. The conversion runs in your browser; nothing is sent anywhere.
More free SVG tools
Need more than one change?
The Splice editor edits SVGs visually — shapes, text, colors, layers — across many files at once, with the code in sync.
Open the editor