How to Convert JPG to SVG (3 Free Methods)
Converting a JPG to SVG is not a simple format swap like going from PNG to WebP. JPG is a raster format — a grid of colored pixels. SVG is a vector format — mathematical paths and shapes described in XML. To convert JPG to SVG, software must trace the pixel data and approximate it as vector paths. The result is never a pixel-perfect copy. It is a reconstruction, and the quality depends entirely on the source image and the tracing method you choose.
Tracing works brilliantly for logos, icons, line art, and simple illustrations. It falls apart on photographs and complex gradients. Before you start, set your expectations: if your JPG is a photo of a sunset, no tool will produce a usable SVG. If it is a clean logo on a white background, you will get excellent results.
Here are three free methods, ranked from most control to most convenience.
Why Convert JPG to SVG?
SVG files have properties that raster formats cannot match:
- Infinite scalability. An SVG logo looks sharp on a 16px favicon and a 10-foot banner. A JPG gets blurry the moment you scale past its native resolution.
- Tiny file size for simple graphics. A logo that weighs 85 KB as a JPG might weigh 4 KB as an SVG. Fewer bytes, faster pages.
- Editable paths. SVG is XML under the hood. You can open it in a text editor, change colors with find-and-replace, animate paths with CSS, and manipulate shapes with JavaScript.
- Transparency without bloat. SVG supports transparency natively, without the file size cost that PNG transparency brings. (For a deeper dive into vector vs raster tradeoffs, see SVG vs PNG: When to Use Each Format.)
- CSS and JS integration. Embed an SVG inline and style it with your site's CSS. Change colors on hover, animate strokes, respond to dark mode — none of that is possible with a JPG.
The common thread: if your image is a graphic (not a photograph), SVG is almost always the better format for web use.
Try it yourself
Convert between any image format instantly — free, instant, no signup. Your images never leave your browser.
Method 1 — Inkscape Trace Bitmap (Desktop, GPL-2.0)
Inkscape 1.4 is the most powerful free option for converting JPG to SVG. Its Trace Bitmap feature gives you fine-grained control over the tracing algorithm, threshold values, and output quality. Inkscape is licensed under GPL-2.0 and runs on Windows, macOS, and Linux.
Step-by-Step
Open your JPG. Launch Inkscape 1.4 and go to
File → Open. Select your JPG file. Inkscape imports it as an embedded raster image on the canvas.Select the image. Click on the imported JPG so it shows selection handles (arrows at corners and edges).
Open Trace Bitmap. Go to
Path → Trace Bitmap(or pressShift+Alt+B). The Trace Bitmap dialog opens on the right panel.Choose a detection mode. Inkscape 1.4 offers three single-scan modes and two multi-scan modes:
Brightness Cutoff — converts the image to black and white using a brightness threshold (0.0 to 1.0). Pixels brighter than the threshold become white; darker pixels become black. Best for: high-contrast logos and text on solid backgrounds. Start with a threshold of 0.450 and adjust.
Edge Detection — traces the edges/outlines of shapes rather than filled regions. Produces an outline-style SVG. The threshold controls edge sensitivity (lower = more edges detected). Best for: architectural drawings, wireframes, and outline-only conversions.
Color Quantization — groups pixels into a specified number of colors and traces each color region as a separate path. Set the number of colors to match your source image (2–8 works well for simple graphics). Best for: multi-color logos and illustrations with flat color regions.
Autotrace and Centerline modes are available under multi-scan but are more specialized. For most JPG-to-SVG conversions, the three modes above cover your needs.
Adjust settings. Check the Live Preview box to see changes in real time. Key options:
- Smooth — applies Gaussian blur before tracing to reduce noise. Enable this for JPGs with compression artifacts (most JPGs have them).
- Stack scans — in multi-scan mode, stacks color layers. Keep enabled for color tracing.
- Remove background — eliminates the background color region. Enable when tracing a logo on a white background.
- Speckles — suppresses regions smaller than a given pixel count. Set to 4–10 to eliminate JPG compression noise.
- Smooth corners — rounds off jagged corners in the traced paths. A value of 0.5–1.0 cleans up staircase artifacts.
Apply. Click Apply. Inkscape generates the vector trace on top of the original raster image.
Delete the original raster. The traced SVG sits directly over the imported JPG. Click away to deselect, then click the raster image below and press
Delete. Only the vector trace remains.Save as SVG. Go to
File → Save As, choose Inkscape SVG or Plain SVG (Plain SVG is cleaner for web use — it omits Inkscape-specific metadata). Done.
Tips for Better Results
- Prepare the JPG first. Increase contrast in any image editor before tracing. Tracing algorithms work on contrast boundaries — the sharper those boundaries, the cleaner the trace.
- Use the highest resolution source. A 1200×1200 JPG produces a much cleaner trace than a 200×200 one. More pixels give the algorithm more data to work with.
- Try multiple modes. Run Brightness Cutoff and Color Quantization on the same image and compare. Different modes work better for different images.
Method 2 — Potrace CLI (GPL-2.0)
Potrace 1.16 is the tracing engine that powers Inkscape's Trace Bitmap behind the scenes. Running it directly from the command line gives you scriptable, batch-capable JPG-to-SVG conversion. Potrace is licensed under GPL-2.0.
There is one catch: Potrace only accepts PBM, PGM, PPM, and BMP input. You need to convert your JPG to one of these formats first. ImageMagick 7.1 (Apache 2.0) handles that conversion.
Install
On Ubuntu/Debian:
sudo apt install potrace imagemagick
On macOS with Homebrew:
brew install potrace imagemagick
Verify versions:
potrace --version
# potrace 1.16
magick --version
# ImageMagick 7.1.x
Convert JPG to SVG
Two commands. First, convert JPG to PBM (portable bitmap). Then trace PBM to SVG:
# Step 1: Convert JPG to PBM (black and white bitmap)
magick input.jpg -threshold 50% input.pbm
# Step 2: Trace PBM to SVG
potrace input.pbm -s -o output.svg
The -threshold 50% flag converts the JPG to pure black and white at the 50% brightness boundary. Adjust this value: lower thresholds (e.g., 30%) keep more dark detail; higher thresholds (e.g., 70%) keep only the darkest regions.
The -s flag tells Potrace to output SVG format. The -o flag specifies the output filename.
Useful Potrace Options
| Flag | Purpose | Default | Example |
|---|---|---|---|
-s |
Output SVG format | off (outputs EPS) | potrace -s |
-t N |
Suppress speckles smaller than N pixels | 2 | potrace -t 10 for noisy JPGs |
-a N |
Corner threshold (0 = sharp, 1.334 = smooth) | 1.0 | potrace -a 0 for crisp corners |
-O N |
Curve optimization tolerance | 0.2 | potrace -O 1 for simpler paths |
-z |
Turnpolicy (how ambiguous pixels resolve) | minority | potrace -z black for dark images |
--flat |
Omit grouping/layering in SVG output | off | potrace --flat for cleaner SVG |
Batch Conversion
Process an entire folder of JPGs:
for file in *.jpg; do
magick "$file" -threshold 50% "${file%.jpg}.pbm"
potrace "${file%.jpg}.pbm" -s -o "${file%.jpg}.svg"
rm "${file%.jpg}.pbm" # clean up intermediate file
done
When to Choose Potrace Over Inkscape
Potrace wins when you need automation: batch conversion of 50 icons, integration into a CI/CD pipeline, or scripted preprocessing with ImageMagick. Inkscape wins when you need visual feedback and per-image tuning.
Method 3 — Online Vectorization Tools
If you need a quick one-off conversion and do not want to install software, browser-based tools get the job done.
Pixotter
Pixotter's converter handles format conversions entirely client-side — your images never leave your browser. No upload, no server round-trip, no privacy concerns. If SVG output is supported for your source image, this is the fastest path: drop your file, pick the target format, download. Check the converter hub for current format support.
Vectorizer.io
Vectorizer.io is a dedicated raster-to-vector service. It supports JPG, PNG, and BMP input with automatic color detection and multi-color tracing. The free tier produces SVGs with a watermark; the paid tier removes it. Processing happens server-side, so your image is uploaded to their servers.
Convertio
Convertio offers a straightforward JPG-to-SVG pipeline with a drag-and-drop interface. The free tier allows files up to 100 MB and 10 conversions per 24 hours. Like Vectorizer.io, processing is server-side.
Privacy Comparison
| Tool | Processing | Image Uploaded? | Free Tier Limits |
|---|---|---|---|
| Pixotter | Client-side (WASM) | No | Unlimited |
| Vectorizer.io | Server-side | Yes | Watermarked output |
| Convertio | Server-side | Yes | 10/day, 100 MB max |
If you work with sensitive images — client logos, unreleased product shots, medical or legal documents — client-side processing is the only option that keeps your files private by design.
JPG vs SVG — Key Differences
Before converting, make sure SVG is actually the right target format for your use case.
| Feature | JPG | SVG |
|---|---|---|
| Type | Raster (pixel grid) | Vector (mathematical paths) |
| Scalability | Fixed resolution — blurs when enlarged | Infinite — sharp at any size |
| File size for photos | Small (10–200 KB typical) | Enormous (often 1 MB+) |
| File size for line art | Moderate (20–100 KB) | Tiny (1–15 KB) |
| Transparency | Not supported | Fully supported |
| Animation | Not supported | Supported (CSS/SMIL/JS) |
| Browser support | Universal | Universal (all modern browsers) |
| Editability | Pixel-level only (Photoshop, GIMP) | Path-level (Inkscape, Figma, text editor) |
| Best for | Photographs, complex scenes | Logos, icons, illustrations, UI elements |
The pattern is clear: JPG is built for photographs with millions of colors and smooth gradients. SVG is built for graphics with clean lines and flat color regions. Converting a photograph to SVG produces a massive, ugly file. Converting a logo to SVG produces a tiny, infinitely scalable one.
For a related comparison between vector and raster formats, see SVG vs PNG: When to Use Each Format. And if you ever need the reverse conversion — SVG back to a raster format — see How to Convert SVG to PNG.
When Tracing Works (and When It Doesn't)
Tracing is an approximation, not a codec. The algorithm guesses where edges and regions are based on contrast differences. Some images make that job easy; others make it impossible.
Tracing Quality Guide
| Source Image Type | Tracing Quality | Example |
|---|---|---|
| Black-and-white logo | Excellent | Company logos, wordmarks |
| Flat-color icon | Excellent | App icons, UI icons |
| Line art / sketch | Very good | Pencil drawings, wireframes |
| Text / typography | Good (with high-res source) | Scanned lettering, hand-drawn type |
| Simple illustration | Good | Cartoon characters, infographics |
| Gradient-heavy graphic | Poor | Buttons with gradients, 3D renders |
| Photograph | Very poor | Portraits, landscapes, product shots |
| Detailed texture | Very poor | Fabric, wood grain, natural patterns |
Why Photos Fail
A photograph has millions of unique colors and smooth, continuous gradients. A tracing algorithm must reduce this to discrete vector shapes — flat color regions with hard edges. The result is a posterized, blocky approximation that is usually larger than the original JPG and looks worse. If you need a scalable photograph, the answer is not SVG; the answer is a high-resolution raster image (JPG at 2x or 3x your display size).
Getting the Best Results
- Start with the cleanest source you can find. A vector original exported to JPG will re-trace much better than a photo.
- Increase contrast before tracing. Use ImageMagick:
magick input.jpg -contrast-stretch 2%x2% prepped.jpg - Remove the background first. A transparent PNG traces cleaner than a JPG with a white background. Use Pixotter's background removal tool to strip the background before conversion.
- Simplify colors. If your image has 20 similar shades of blue, reduce them to 3 or 4 distinct shades before tracing. ImageMagick:
magick input.jpg -colors 6 reduced.jpg - Accept imperfection. Even good traces need manual cleanup in Inkscape or Figma — stray nodes, wobbly paths, disconnected fragments. Budget 5–10 minutes of cleanup per traced image.
FAQ
Can I convert a photo to SVG?
Technically yes, but the result will not be useful. Tracing a photograph produces hundreds or thousands of vector shapes that approximate the original — the file will be 5–50x larger than the JPG and look like a low-quality posterized version of the original. Photos belong in raster formats (JPG, WebP, AVIF). SVG is for graphics with clean edges and flat colors.
Is SVG always better than JPG?
No. For photographs and images with complex color gradients, JPG is far more efficient. A portrait photograph as SVG might weigh 3 MB and look worse than a 150 KB JPG. SVG wins for logos, icons, illustrations, and anything you need to scale without quality loss. Choose the format that matches the image type.
Will my SVG look exactly like my JPG?
No. Tracing is an approximation, not a lossless conversion. The SVG will capture the general shapes and regions of the JPG, but fine details, anti-aliased edges, and subtle color variations will be lost or simplified. For simple, high-contrast images (logos, icons), the approximation is very close. For complex images, the difference is obvious.
What resolution JPG works best for tracing?
Higher resolution gives better tracing results. Aim for at least 300 DPI or 1000+ pixels on the longest side. The tracing algorithm detects edges by analyzing pixel contrast — more pixels means more data points and smoother curves. A 100x100 logo will trace with jagged edges; the same logo at 1200x1200 will trace cleanly.
High contrast matters more than raw resolution, though. A 600x600 black-on-white logo traces better than a 2000x2000 logo with a noisy grey background.
Can I edit the SVG after conversion?
Yes — and that is one of the main reasons to convert in the first place. Once you have an SVG, you can open it in Inkscape 1.4, Figma, Adobe Illustrator, or even a text editor. Move individual paths, change fill colors, delete unwanted elements, add new shapes, adjust curves, and resize without quality loss. This editability is what makes SVG valuable for design workflows.
What is the difference between tracing and embedding?
Some tools "convert" JPG to SVG by wrapping the raster image inside an SVG container using the <image> tag. This produces a valid SVG file, but the image inside is still a raster bitmap — it does not scale cleanly, is not editable as vector paths, and gains none of SVG's advantages. True conversion means tracing: analyzing the pixel data and generating vector paths. If your SVG file is the same size as your JPG, it was probably embedded, not traced.
Which method should I use?
- Inkscape 1.4 if you want visual control, live preview, and per-image tuning. Best for important assets like brand logos.
- Potrace 1.16 if you need batch processing, scripting, or CI/CD integration. Best for converting folders of icons or automating a pipeline.
- Online tools if you need a quick one-off and cannot install software. Pixotter's converter keeps your files private with client-side processing.
Try it yourself
Ready to convert formats? Drop your image and get results in seconds — free, instant, no signup. Your images never leave your browser.