Image & SVG
SVG to Android Vector Drawable
Convert supported SVG paths into Android Vector Drawable XML.
This converter parses SVG XML and supports path-based icons. It does not render or execute SVG content.
Android Vector XML will appear here.
How to use this tool
Paste an SVG or drop a local `.svg` file.
The converter reads path-based SVG content and outputs Android Vector Drawable XML.
Copy the XML into an Android `res/drawable` vector resource and review the result in Android Studio.
Supported SVG features
This converter is best for simple icon SVGs built from `path` elements.
Fill color, fill opacity, stroke color, and stroke width are mapped where possible.
The SVG `viewBox` is used to set Android viewport width and height.
Important limitations
Android Vector Drawable does not support every SVG feature. Filters, masks, complex gradients, embedded images, and text usually need manual cleanup or a design export pass.
If an SVG contains shapes instead of paths, convert shapes to paths in your design tool before using this converter.
Always test the output in Android Studio because Vector Drawable rendering can differ from browser SVG rendering.
Examples
Simple icon path
Input<svg viewBox="0 0 24 24"><path fill="#111827" d="M12 2 3 7v10l9 5 9-5V7z"/></svg>Output
<vector ...> <path android:pathData="M12 2 3 7v10l9 5 9-5V7z" android:fillColor="#111827" /> </vector>
Unsupported text
Text nodes are not converted. Convert text to outlines/paths before exporting the SVG.
Input<svg><text>L</text></svg>
FAQ
Why does my SVG say no path elements are supported?
The current converter focuses on SVG `path` elements. Convert rectangles, circles, text, and strokes to paths in your design app before converting.
Are gradients supported?
Complex gradients are not reliably converted in this first version. Flat icon SVGs with path fills are the safest input.
What does viewportWidth mean in Android Vector Drawable?
The viewport is the coordinate system used by the path data. This converter derives it from the SVG viewBox when available.
Is the SVG uploaded?
No. The SVG text is parsed locally in your browser.