How to convert SVG to Android Vector Drawable
imglogotool.com SVG to Android Converter transforms standard SVG files into Android Vector Drawable XML format — ready to use in your Android project. No files are uploaded to any server. All conversion runs locally in your browser.
Drop your SVG file or paste SVG code. The tool parses SVG paths, shapes, and colors.
Set size in dp and optionally apply a tint color. Preview shows how it will look on Android.
Copy or download the Android Vector Drawable XML. Place in res/drawable/.
SVG vs Android Vector Drawable
| SVG | Android VectorDrawable | |
|---|---|---|
| Format | XML (SVG namespace) | XML (Android namespace) |
| Platform | Web, desktop | Android only |
| Coordinates | viewBox units | dp (density-independent pixels) |
| Paths | <path d="..."> | <path android:pathData="..."> |
| Colors | fill="#hex" | android:fillColor="#hex" |
| Scaling | viewBox + width/height | viewport + width/height in dp |
| File location | Anywhere | res/drawable/ |
How to use in Android
<!-- In layout XML -->
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
app:srcCompat="@drawable/ic_your_icon" />
<!-- In Jetpack Compose -->
Icon(
painter = painterResource(R.drawable.ic_your_icon),
contentDescription = "Icon"
)What SVG features are supported?
Android VectorDrawable supports: paths (d attribute), groups (translate, rotate, scale), fill colors, stroke colors + width, and opacity. Not supported: gradients, filters, text, images, CSS styles, clip-path.
Related tools
Need to convert SVG to PNG instead? Use the SVG to PNG Converter — export at any resolution.
Need to edit SVG first? The SVG Editor lets you recolor, move, and group elements.
Need Android app icons? The Chrome Extension Icon Generator creates multiple sizes from one image.
Publishing to Play Store? The Feature Graphic Generator creates 1024×500 banners.
Frequently asked questions
How do I convert SVG to Android Vector Drawable?
Drop your SVG file into the converter above. It automatically converts SVG paths, colors, and shapes to Android VectorDrawable XML format. Copy the code or download the .xml file.
What is an Android Vector Drawable?
Android VectorDrawable is Android's native vector graphics format. It uses XML with Android-specific attributes (android:pathData, android:fillColor) instead of SVG attributes. It scales perfectly on all screen densities.
Is this converter free?
Yes, 100% free. No signup, no limits. All conversion runs in your browser — your SVG files never leave your device.
What SVG features are supported?
Paths (d attribute), fill colors, stroke colors + width, opacity, and basic transforms. Gradients, filters, CSS styles, text elements, and embedded images are not supported by Android VectorDrawable.
Where do I put the XML file in my Android project?
Place the .xml file in res/drawable/ folder. Name it with lowercase and underscores, e.g., ic_my_icon.xml. Reference it as @drawable/ic_my_icon in layouts or R.drawable.ic_my_icon in code.
Does it work with Jetpack Compose?
Yes. Use painterResource(R.drawable.ic_your_icon) in Compose. Vector Drawables work with both traditional Views and Jetpack Compose.
Why not just use SVG directly in Android?
Android does not natively support SVG files. You need to convert to VectorDrawable XML format. Android Studio has a built-in converter (Vector Asset Studio), but this online tool is faster for quick conversions.