Updated

How to create an SVG file

There are four ways to make an SVG. Choose one based on what you are starting from:

Starting fromMethodResult
Nothing, an idea or a sketchDraw in a vector editorClean, editable shapes
Simple geometry you can describeWrite the codeThe smallest possible file
A design in Figma, Illustrator or InkscapeExport as SVGYour existing artwork as SVG
A PNG or JPGTrace itAn approximation in vector shapes

Method 1: Draw it in a free online editor

  1. Open the online SVG editor. A blank 800 × 600 artboard opens. Change the size in the Properties panel, or pick a preset such as Icon 24 or Social 1200×630.
  2. Draw basic shapes with the rectangle tool (M) and its neighbours in the toolbar: ellipse, polygon and star.
  3. Draw custom outlines with the pen tool (P): click to place corner points, drag to create curves, and click the first point to close the shape.
  4. Combine shapes with Object → Pathfinder: Unite, Minus Front, Intersect or Exclude.
  5. Add text with the type tool (T), and set fills, strokes and gradients from the top bar.
  6. Name your layers. Vectopea writes layer names as element ids, which is handy for CSS and animation.
  7. Choose File → Export SVG.

Method 2: Write the SVG code

An SVG file is plain text. Save this as badge.svg and open it in a browser:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="45" fill="#7c4dff"/>
  <path d="M30 52 L45 66 L72 36" fill="none" stroke="#fff" stroke-width="8"
        stroke-linecap="round" stroke-linejoin="round"/>
</svg>

The parts that matter

  • xmlns is required for standalone .svg files.
  • viewBox="0 0 100 100" defines a 100-unit coordinate system that scales to any size.
  • Shapes: <rect>, <circle>, <ellipse>, <line>, <polygon>, and <path> for anything else.

Use the SVG code editor to see a live preview while you type, then open the result in the visual editor to refine it.

Method 3: Export from a design tool

ToolHow to export SVG
FigmaSelect a frame or layer → Export panel → choose SVG → Export
Adobe IllustratorFile → Export → Export As → SVG
InkscapeFile → Save As → Plain SVG or Optimized SVG
VectopeaFile → Export SVG (readable) or Export Minified SVG

Exported files often contain editor metadata. Run them through the SVG optimizer before putting them on a website.

Method 4: Trace a PNG or JPG

Tracing converts pixels into vector outlines. It works well for logos, icons and high-contrast artwork, and poorly for photographs.

  1. Open the image in Inkscape and choose Path → Trace Bitmap.
  2. Pick single-scan (one colour) or multi-scan (several colours) and adjust the threshold until the preview looks right.
  3. Delete the original bitmap, then clean up the traced paths in any vector editor. Vectopea's direct selection tool (A) makes it easy to delete stray points.

Don't just embed the image

Some converters put your PNG inside an <image> tag and call the result an SVG. It won't scale sharply and can't be edited as shapes. Open the file in the SVG viewer: if the markup contains <image href="data:image/png…, it isn't a real vector.

Check your SVG before using it

  • Open it in the SVG viewer to confirm the size and viewBox.
  • Crop it if there's empty space around the artwork.
  • Export a PNG version for places that don't accept SVG, such as email or social media.

Edit SVG in your browser

Free, no sign-up, files stay on your device.

Open the SVG editor

Frequently asked questions

What is the easiest way to make an SVG?

Draw it in a browser-based vector editor such as Vectopea and export SVG. There is nothing to install and the file is valid SVG from the start.

Can I turn a PNG or JPG into an SVG?

Only by tracing it into vector shapes, for example with Inkscape's Trace Bitmap. Wrapping a PNG inside an SVG file keeps it a bitmap: it won't scale sharply or be editable as shapes.

Do I need Illustrator to make SVG files?

No. Free tools such as Vectopea, Inkscape and Figma all export SVG, and you can write SVG by hand in any text editor.

How do I make an SVG for Cricut or other cutting machines?

Draw closed shapes, combine overlapping ones with a union operation, and export SVG. Cutting software follows path outlines, so avoid strokes that should be cut as filled areas; convert them to filled paths first.