SVG → Jetpack Compose Converter

Paste an SVG icon and get ready-to-use Kotlin ImageVector code for Android Jetpack Compose.

SVG Input

0 chars
Ln 1, Col 1
0 B

Compose ImageVector

SVG Preview

Paste SVG to see preview

Quick Example

Click below to load a sample Material-style SVG icon and see the generated Compose code.

Supported SVG Elements

<path>
<rect>
<circle>
<ellipse>
<line>
<polygon>
<polyline>
<g> groups

All SVG path commands (M, L, H, V, C, S, Q, T, A, Z) are supported in both absolute and relative forms. Fill colors, stroke, opacity, and fill-rule (EvenOdd / NonZero) are preserved.

Free Online SVG to Jetpack Compose Converter

Instantly convert SVG icons to Android Jetpack Compose ImageVector Kotlin code. No Android Studio plugins, no Gradle tasks — just paste your SVG and get clean, optimised Compose code that you can drop straight into your project.

The conversion runs on our server and returns only the generated code. Your SVG data is not stored. See our Privacy Policy.

Features

  • All SVG path commands (M, L, C, S, Q, T, A, Z)
  • Shapes: rect, circle, ellipse, line, polygon, polyline
  • Nested <g> groups with inherited styles
  • Fill / stroke colours (hex, rgb, named colours)
  • Fill-rule EvenOdd / NonZero support
  • Customisable icon name & package
  • Live SVG preview
  • Download as .kt file

FAQ

What is an ImageVector?

ImageVector is Jetpack Compose's built-in vector graphic representation. It replaces Android's XML VectorDrawable format and lets you define icons directly in Kotlin with full type-safety.

Why not use Android Studio's built-in SVG converter?

Android Studio converts SVGs to XML VectorDrawable, not Compose ImageVector. This tool skips the XML step and gives you pure Kotlin code you can paste directly into your Compose project.

Are gradients supported?

Currently we convert solid fills and strokes. Linear/radial gradients in SVG will be flattened. We recommend simplifying gradients in your SVG editor before converting.