1. Dashboard
  2. How To Make An Svg File
Local Processing
MintConvertMintConvertMintConvert•100% Client-Side

© 2026 MintConvert. Files process locally in your browser and never touch a server.

All ToolsGuidesAboutFAQPrivacyTermsCookiesllms.txtDonate

Looking for an Engineer? Ping me

MintConvertMintConvertMintConvert
Tools
PNG to SVGJPG to SVGWebP to SVGImage to SVGDXF to SVG
SVG to PNGSVG to JPGSVG to WebPSVG to ICOSVG Code to ImageSVG ConverterSVG to PDFSVG to STLSVG to DXF
SVG to CodeQR Code SVGBarcode Generator SVGSVG to Base64
SVG ViewerSVG AnimatorSVG EditorSVG Background RemoverSVG CompressorSVG Maker
GuidesAboutDonate

How to Make an SVG File: 5 Easy Methods for Beginners

Learn how to make an SVG file five ways: vector editors, hand-written code, tracing an image, design tools and code generation. Includes tips for clean, working SVGs.

November 26, 2026 · MintConvert Team

"You do not need expensive software or a design degree to make an SVG. Depending on what you are creating, you can draw one in a free editor, write it by hand, trace an existing picture, or export it from a design tool you already use.

This guide covers five methods, when each one makes sense, and the checks that keep your file clean and portable. If you are new to the format, start with what an SVG file is.

Before you start: pick the right method

You want to...Best method
Draw a logo or illustration from scratchMethod 1: vector editor
Make a simple shape, icon or badgeMethod 2: write the code
Turn an existing PNG, JPG or sketch into a vectorMethod 3: trace an image
Export artwork you already designedMethod 4: design tool export
Generate charts or repeating patternsMethod 5: code or scripts

Method 1: Draw it in a vector editor

A vector editor is the most natural way to create an SVG because you draw shapes visually and the tool writes the code for you.

Popular choices:

  • Inkscape (free, open source, SVG is its native format)
  • Figma (free tier, browser based, exports SVG)
  • Adobe Illustrator (paid, industry standard)
  • Affinity Designer (one-time purchase)

Steps in a typical editor:

  1. Create a new document with a square or rectangular artboard.
  2. Draw with the shape tools (rectangle, ellipse, polygon) or the pen tool for custom curves.
  3. Set fills and strokes. Keep the number of colors small for cleaner results.
  4. Group related shapes and give layers sensible names.
  5. Save or export as SVG.

In Inkscape, choose Plain SVG when you want the cleanest file, since the default Inkscape SVG includes extra editor data.

Method 2: Write an SVG by hand

Because SVG is plain text, you can create one in any code editor. This is a great way to understand the format and perfect for simple icons.

Create a file called icon.svg and paste this in:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64">
  <rect x="4" y="4" width="56" height="56" rx="12" fill="#10b981" />
  <circle cx="32" cy="32" r="14" fill="none" stroke="#ffffff" stroke-width="6" />
</svg>

What each part does:

  • xmlns identifies the file as SVG. Always include it in standalone files.
  • viewBox="0 0 64 64" creates a 64 by 64 drawing area that scales to any display size.
  • rect draws a rounded square, and circle draws a ring.

The core shape elements you will use most:

  • <rect> for rectangles and rounded rectangles
  • <circle> and <ellipse> for round shapes
  • <line>, <polyline> and <polygon> for straight edges
  • <path> for anything with curves (the most powerful element)
  • <text> for lettering

To check your work, drop the file or code into an SVG viewer. It renders the file instantly, lets you zoom in, and flags problems such as a missing viewBox.

Method 3: Trace an existing image into an SVG

If you already have a logo, icon or sketch as a PNG or JPG, you do not have to redraw it. Tracing converts pixels into vector paths automatically.

Steps:

  1. Start with the largest, cleanest version of the image you have.
  2. Upload it to an image to SVG tool, or use the PNG to SVG tool if your source is a PNG.
  3. Pick a style that matches the artwork (logo, illustration or detailed).
  4. Reduce the number of colors until the preview starts losing something you need. Flat logos usually look best with a handful of colors.
  5. For pencil sketches or signatures, switch to black and white mode and adjust the threshold.
  6. Download the SVG and open it in an editor if you want to refine the paths.

Tracing works best on flat artwork: logos, icons, line art and simple illustrations. Photographs can be traced, but they create very large files with a posterized look.

Method 4: Export from a design tool you already use

If your artwork already lives in Figma, Illustrator, Canva-style tools or presentation software, you may only need to export it.

In Figma, for example:

  1. Select the frame or shape.
  2. In the Export section of the right panel, choose SVG.
  3. Before exporting, convert text to outlines and expand strokes if the SVG will be used for cutting or 3D printing.

A few export habits prevent most headaches:

  • Outline your text. Otherwise fonts may fall back to a default on another computer.
  • Embed images instead of linking to external files.
  • Flatten effects like blur and complex masks if the SVG must work in many apps.
  • Crop the artboard close to the artwork so the file does not carry extra empty space.

Method 5: Generate SVG with code

When graphics are data-driven or repetitive, generating SVG from code saves enormous time.

  • JavaScript libraries like D3 and Chart.js (in SVG mode) draw charts as SVG elements.
  • Server-side scripts in Python, Node or any language can output SVG as a string.
  • AI assistants can write SVG markup from a text description, which you can then paste into a viewer and refine.

A tiny JavaScript example that draws a row of circles:

const circles = Array.from({ length: 5 }, (_, i) =>
  `<circle cx="${20 + i * 30}" cy="20" r="10" fill="#6366f1" />`
).join("");

const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 40">${circles}</svg>`;

If you end up with raw SVG code and need an actual image file, paste it into an SVG code to image tool and export a PNG, JPG or WebP.

Make your SVG move (optional)

Once you have a clean SVG, you can add motion without video or GIF files. CSS keyframes and SMIL can spin, pulse, float or draw strokes. An SVG animator lets you pick a preset, tune timing and download the animated file.

Checklist for a clean, reliable SVG

Run through this list before you publish or share your file:

  1. Has `xmlns`. Standalone SVG files need xmlns="http://www.w3.org/2000/svg".
  2. Has a `viewBox`. Without it, scaling and cropping can behave unpredictably.
  3. Text is outlined if exact lettering matters.
  4. No linked external fonts or images. Embed or convert them.
  5. Strokes are expanded to fills if the file is headed to a cutter or 3D printer.
  6. Unused layers and hidden shapes are removed, so the file stays light.
  7. Tested on light and dark backgrounds. A dark icon can vanish on a dark theme.
  8. Opened in a second app or browser to confirm it renders the same.

Common mistakes beginners make

  • Drawing at a tiny size and scaling the viewBox wrong. Pick a sensible viewBox first (like 0 0 100 100) and keep all coordinates inside it.
  • Tracing a low-quality image and expecting perfect paths. Garbage in, garbage out. Use the best source you can find.
  • Using too many colors when tracing. More colors mean more paths and a heavier file.
  • Leaving editor metadata inside the file. Export as plain SVG or run it through an optimizer.
  • Forgetting to test the file before sending it to a client or uploading it to a website.

Key takeaways

Draw it in a vector editor, write it by hand, trace an existing image, export from a design tool, or generate it with code. Whichever way you create it, add a viewBox, outline your text, embed your assets and test the result. Then you will have an SVG that works everywhere.

Frequently asked questions

More articles

November 26, 2026

How to Open an SVG File on Windows, Mac, iPhone & Android

How to open an SVG file on any device. Use your browser, a free online viewer, Inkscape, Figma or a text editor, plus fixes for blank or broken SVGs.

Read article
November 26, 2026

SVG vs PNG vs EPS: Which Format Should You Use?

SVG vs PNG vs EPS explained. Compare vector and raster formats, see whether SVG is a vector format, and pick the right file type for web, print and design.

Read article
November 26, 2026

What Is an SVG File? Meaning, File Type & How It Works

What is an SVG file? Learn the SVG meaning, file type and extension, how vector graphics work, when to use them, and how to open or convert one.

Read article
All articles

On this page