Tutorials

How to Make an SVG File: 4 Free Methods (Code, Editor, Image, AI)

SVG Genie TeamSVG Design Expert & Technical Writer at SVG Genie
||6 min read

Reviewed by SVG Genie Editorial Team

You can make an SVG file in four ways: write the code, draw it in a vector editor, convert an existing image, or generate it with AI. The fastest route for most people is to describe the graphic in the SVG Genie AI generator and download a clean, editable .svg. You don't need design software.

MethodBest forTimeCost
AI generationLogos, icons, illustrations from scratchSecondsFree previews
Convert an imageExisting PNG/JPG logos and line artAbout 1 min3 free conversions/day
Vector editorPrecise custom artworkMinutes to hoursFree (Inkscape, Figma)
Hand-written codeSimple shapes, developersMinutesFree

Method 1: Generate an SVG with AI (fastest)

  1. Open the AI SVG generator.
  2. Describe it, for example: "minimal coffee cup icon, flat, two colors".
  3. Pick a style and generate.
  4. Download the .svg. It is real vector paths, not an embedded PNG.

Useful follow-ups: prompt examples for AI vectors, the SVG logo maker, and the AI icon generator. You can also compare ChatGPT, Claude and Gemini in the best AI model for SVG generation.

Method 2: Convert a PNG or JPG to SVG

  1. Upload the image to the image to SVG converter (or the PNG or JPG converter).
  2. Download the traced vector.
  3. Adjust colors in the SVG color changer.

This works best on flat logos and line art. See how to convert PNG to SVG for the full walkthrough.

Method 3: Draw it in a vector editor

  • Inkscape (free): draw, then File → Save As → Plain SVG.
  • Figma (free tier): select the frame, then Export → SVG. See how to export SVG from Figma.
  • Illustrator: File → Export → Export As → SVG.

Need a quick online edit instead? Use the SVG editor, or compare the best SVG editors.

Method 4: Write SVG code by hand

SVG is XML text, as defined in the W3C SVG 2 specification. Save this as circle.svg:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="#8600ef" />
</svg>

Include both xmlns and viewBox. Without them, many apps won't display the file. See viewBox vs width and height. To paste markup and download a file, use code to SVG. To preview it live, use the SVG playground.

Check the file before you use it

  1. Run it through the SVG validator.
  2. Shrink it with the SVG optimizer.
  3. If it won't display, see SVG not showing in browser.

For Cricut or laser cutting, follow SVG files for Cricut. New to the format? Start with what is SVG.

Make your first SVG now: generate one free with SVG Genie.

Create your own SVG graphics with AI

Describe what you need, get a production-ready vector in seconds. No design skills required.

Try SVG Genie Freearrow_forward

About This Article

This article was written by SVG Genie Team based on hands-on testing with SVG Genie’s tools and years of experience in vector design and web graphics. All recommendations reflect real-world usage and are reviewed by the SVG Genie editorial team for accuracy.

About the Author

SVG Genie Team

SVG Design Expert & Technical Writer at SVG Genie

SVG Genie Team is a vector design specialist and technical writer at SVG Genie with years of hands-on experience in SVG tooling, AI-assisted design workflows, and web graphics optimization. Their work focuses on making professional vector design accessible to everyone.

More articles by SVG Genie Teamarrow_forward

Ready to Create Your Own Vectors?

Start designing with AI-powered precision today.

Get Started Freearrow_forward