JPG to DXF Converter

Trace a scan or photo of a drawing from JPG into a DXF for cutting, CNC or CAD, with the JPEG noise cleaned up, and check the outline over your image. It runs in your browser, with no signup.

Drop a JPG here

Paste works too, and so does . JPG up to 50 MiB.

Converted in this browser. Your file is not uploaded.

Options

Threshold
Which pixels count as dark. Auto finds the level that best separates the drawing from the paper. If a shadow or a stain comes out as a shape, set a lower level.
JPEG cleanup
Smooths away JPEG blocks and noise before tracing, keeping square corners. High also clears clumps and can blunt sharp points.
Detail
High keeps smaller dots and shapes. Low drops them for a simpler outline.
Traces the light part of the image instead of the dark part.
mm
The width of the whole image, margins included. From the file, it follows the pixels per inch the image states, otherwise 100 mm. The height follows.
Units
The drawing unit of the DXF. Set the same unit when you import it.
DXF type
Compatible writes curves as short straight lines, the plainest DXF. Curves keeps arcs, circles and splines.
Advanced
Smoothing
High turns more corners into smooth curves. Low keeps more sharp corners and straight lines.
Drops dots too small to cut. Turn it off to keep marks only a few pixels across.

Preflight

Runs when you add a file

  • Not checked yet: Image size

    The image's size in pixels and the resolution that gives it a real-world size.

  • Not checked yet: Open paths

    Outlines that do not close.

  • Not checked yet: Duplicate lines

    Lines drawn twice in the same place.

  • Not checked yet: Strokes and fills

    How many filled shapes the trace made. A trace makes filled areas only, never a line.

  • Not checked yet: Nodes

    How many points the outlines have.

Next step

JPG up to 50 MiB. Up to 200 files or 500 MiB at once. A job stops after 60 seconds.

How to convert JPG to DXF

  1. Add your scan or photo. Drop JPG files on the mat or press Choose file. To see it work first, Try a sample loads a scanned key tag with grain and a shadow.

  2. Get a clean trace. Your picture sits faintly under the traced lines. If paper, shadow or smudges turn into shapes, switch Threshold to a set level; if edges look ragged, raise JPEG cleanup. Then enter the real Width and pick Units, and read the Preflight findings.

  3. Save it for your machine. Download DXF gives the DXF, with an SVG copy beside it. A batch of photos downloads as a ZIP.

What the options do

Threshold
Decides which grey counts as ink. Auto picks the level between paper and ink; a set level helps when a shadow or stain gets traced.
Level
Anything darker than this becomes part of the drawing. Go up for faint pencil, down to drop grey paper and smudges.
JPEG cleanup
Evens out compression blocks and paper grain, keeping square corners. High also clears clumps and can blunt sharp points.
Detail
Higher keeps tiny features; lower simplifies the drawing by dropping them.
Smoothing
Higher bends jagged steps into curves; lower keeps crisp corners.
Remove specks
Skips marks too tiny to cut, such as dust from the scanner glass.
Invert
Swaps ink and paper, so the paper becomes the shape.
Width
Real width of the full picture, borders and all. Left on "From the file", it follows the JPG's pixels per inch, else 100 mm.
Units
Millimetres or inches inside the DXF. The older format has nowhere to store this, so pick it again on import.
DXF type
Compatible (R12) turns every curve into many short lines. Curves (R2000) stores real curves and the unit.

Questions

How do I convert a JPG to a DXF file?

Pixels have to become lines, so the picture is traced. After compression noise is evened out, everything darker than the Threshold level is outlined as closed shapes, shown on top of your picture before saving.

Can I trace a photo of a drawing?

Yes. Shoot it flat and square on, in soft even light, and crop away the table; a sideways phone photo is set upright. If a shadow is traced, use a lower Threshold level. Your phone cannot know the paper's size, so measure it and type the Width.

What size will my DXF be?

A scanner records its resolution in the JPG, and that sets the size, so 600 pixels scanned at 300 pixels per inch come out 50.8 mm wide. With no resolution saved, the picture becomes 100 mm wide and a note tells you. The readout under the preview gives the drawing's own size, without margins.

Why is the outline ragged, or full of specks?

Compression leaves blocky halos around dark edges, and paper has grain. A stronger JPEG cleanup evens both out before tracing, and specks too small to cut are dropped and counted in a note. Scanning at a higher quality setting helps most.

Will the DXF open in my cutting or CAD program?

Each DXF from this page is checked in our tests by an independent DXF audit, with the size and closed outlines we expect. We have not yet opened them in a cutting or CAD program. Choose the same Units when you import.

Is my photo uploaded?

No. Tracing and DXF writing happen in your browser, so the photo stays on your device. After your first trace, the page also works offline.

Related tools

Limits

JPG file50 MiB. A larger file is not converted and you are told why. A picture over 40 megapixels is shrunk first, and only if you agree.
Several files200 files or 500 MiB at once. Files beyond that are listed as skipped.
TimeA single job is stopped after 60 seconds.
BrowserNeeds Web Workers, WebAssembly, OffscreenCanvas, and createImageBitmap. Current Chrome, Edge, Firefox and Safari have them.