Canonical: https://toolipedia.app/svg-to-android-vector-drawable

# SVG to Android Vector Drawable

Convert an SVG icon into Android vector drawable XML with paths, shapes, groups, colours, strokes and simple transforms, and see what could not be converted.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > SVG to Android Vector Drawable

## About SVG to Android Vector Drawable

Android vector drawables describe an icon with a viewport and path elements. This converter reads your SVG and writes the XML: the viewBox becomes viewportWidth and viewportHeight, and path, rect, circle, ellipse, line, polyline and polygon become pathData. Fill and stroke colours, opacity, line caps and joins, the even-odd fill rule and translate, scale and rotate transforms are converted to attributes or nested groups. Gradients, clip paths, masks, text and images are listed as not converted instead of being faked. Example: a red triangle path with fill #ff0000 becomes a path with fillColor #FF0000.

## How to use SVG to Android Vector Drawable
1. Paste the SVG code, including the svg element with its viewBox.
2. Optionally set a width in dp and the tint or auto-mirroring options.
3. Copy the XML into res/drawable in Android Studio and read the warnings about anything that was left out.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- svg to android vector drawable
- svg to vectordrawable xml
- convert svg for android studio
- android vector asset from svg
- svg path to android xml

## Frequently asked questions

### Which SVG features are not supported?

Gradients, patterns, clip paths, masks, filters, text, embedded images and matrix or skew transforms. Vector drawables are simpler than SVG, so these are skipped and listed under the result.

### Why does my icon turn black on Android?

An SVG shape without a fill is black by default, and the converter keeps that rule. Set the fill colour in the SVG, or tick the tint option and tint the icon from your layout or theme.

### Does the even-odd fill rule work on every Android version?

The fillType attribute is available from Android 7.0 (API 24). On older versions the shape is drawn with the default non-zero rule, so test holes in icons on your lowest supported version.

### Is SVG to Android Vector Drawable free?

Yes. SVG to Android Vector Drawable on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with SVG to Android Vector Drawable:
- [Android and iOS Image Density Exporter](https://toolipedia.app/android-ios-image-density-exporter)
- [SVG to PDF](https://toolipedia.app/svg-to-pdf)
- [JSON to XML converter](https://toolipedia.app/json-xml-converter)
- [Tel and SMS Link Generator](https://toolipedia.app/tel-and-sms-link-generator)
- [Badge (shields) generator](https://toolipedia.app/badge-generator)
