SVG Code to File Converter
Paste any SVG image code, preview it live, download as a SVG file, convert to PNG, or get the Base64. Also learn to import SVG react and use React Native SVG.
SVG Code (svg coding)
Live Preview — Render SVG
Import SVG React — React SVG Icon
How to import SVG react as a component or use a react svg icon:
React Native SVG — SVGs in React Native
How to use svgs in react native with react-native-svg:
SVG Format Reference — SVG Element & SVG File Structure
A quick SVG format cheatsheet covering common SVG element types and SVG coding patterns.
Root SVG element. width, height, viewBox attributes required.
cx, cy, r — center and radius. Fill with fill="" attribute.
x, y, width, height, rx (rounded corners).
d attribute with M (move), L (line), C (curve), Z (close).
x, y, font-size, fill. Can use <tspan> for multiline.
x1, y1, x2, y2 — draws a straight line.
points="x1,y1 x2,y2 …" — closed shape.
Group element. Apply transforms to all children.