How to Convert an Image to DXF for CNC Cutting (and When Auto-Trace Falls Short)
Your cutting machine doesn't care about pixels. A JPG or PNG is a grid of colored dots. It looks like a logo or a part, but there is nothing in it a laser, plasma torch or router bit can follow. What the machine needs is a vector file: lines and curves with exact coordinates, which is what a DXF holds.
So "converting an image to DXF" really means tracing the picture into paths. You can do that yourself with free or common software, and for simple, bold shapes it works well. For other jobs, the trace is only the start. Here's how to do it, what to check afterward, and how to tell when a redraw is the better route.
What makes a DXF cut-ready
Before you trace anything, know what you're aiming for. A DXF that cuts cleanly has:
- Closed outlines. Every shape is a loop whose end point meets its start point, so the CAM software knows what's inside and outside.
- Real-world size. The file is drawn at 1:1 in known units, inches or millimeters, so a 12-inch sign comes out at 12 inches.
- Single, clean lines. One line per edge, with no double outlines or stacked copies that make the machine cut twice.
- No stray specks. Every tiny leftover shape becomes a tiny cut, or a pierce mark on a plasma table.
- A sensible node count. Smooth curves and straight lines, not thousands of tiny segments that make the machine stutter.
The DIY route: auto-trace
Start with the largest, sharpest version of the image you have. A dark design on a plain light background traces best.
Inkscape (free)
- File > Import the image, then select it.
- Open Path > Trace Bitmap (Shift+Alt+B).
- For a one-color logo or part, use Brightness cutoff and adjust the threshold until the preview looks right. Click Apply.
- The trace lands on top of the original. Drag it aside and delete the bitmap.
- File > Save As (or Save a Copy) and pick Desktop Cutting Plotter (AutoCAD DXF R14) (*.dxf). Check the base unit in the export options.
Adobe Illustrator
- Place the image and select it.
- Open Window > Image Trace and pick a simple preset such as Black and White Logo or Silhouettes. Photo presets produce far too much detail for cutting.
- Click Expand (or Object > Image Trace > Expand) so the trace becomes editable paths.
- Remove the white background shapes, then File > Export > Export As and choose AutoCAD Interchange File (DXF).
LightBurn
- File > Import the image and select it.
- Choose Tools > Trace Image (Alt+T), adjust the threshold and "ignore less than" setting to drop specks, and click OK.
- Move the trace off the image and delete the bitmap. Then use File > Export to save a DXF, if another program or shop needs one.
What auto-trace usually gets wrong
Auto-trace follows pixels, not intent. Expect some of these:
- Wobbly or lumpy edges where the image was soft, small or compressed. JPEG artifacts around edges turn into bumps.
- Too many nodes, especially on curves, which cut slowly and leave a rough edge.
- Specks and noise from dust, paper texture or shading.
- Double outlines. A traced line drawing becomes a thin filled shape, with one outline on each side of the original line. If you wanted a single engraved or scored line, that's two cuts instead of one.
- Text that loses its shape, so small letters fill in, thin strokes break up and counters close up.
- No real dimensions. The trace is sized to the pixels, not to your part.
Cleanup checklist after tracing
Run through this before the file goes near a machine:
- Delete specks. Zoom in and remove tiny stray shapes.
- Simplify nodes. Use Path > Simplify (Ctrl+L) in Inkscape or Object > Path > Simplify in Illustrator, a little at a time, so corners don't round off.
- Scale to one known measurement. Measure something real, like the overall width or the distance between two holes, and scale the whole drawing to match.
- Check that every path is closed. In LightBurn, Edit > Select Open Shapes finds them. In AutoCAD-style programs, try JOIN or PEDIT and see what won't connect.
- Remove duplicate lines. LightBurn has Edit > Delete Duplicates, AutoCAD has OVERKILL. Elsewhere, move a line and see if another one is hiding under it.
- Confirm units on export. Re-open the DXF and measure one feature.
- Test in your CAM software. Make sure it generates a toolpath and that the preview cuts each edge once.
We cover the full pre-cut checklist, including kerf, bridges and small features, in how to prepare a DXF file for laser cutting.
When to redraw instead of trace
Tracing copies what's in the picture, flaws included. A redraw rebuilds the shape with clean lines, true arcs and real dimensions. Redraw when:
- The part has exact dimensions. Holes, slots, bolt patterns and brackets need to be where the drawing says, not where the pixels landed.
- The photo is low-resolution or taken at an angle. Perspective makes squares into trapezoids, and no trace setting fixes that.
- It's a hand sketch. Uneven pencil lines trace as uneven paths.
- The logo has small text or fine detail that has to stay readable once cut.
- It must fit another part, like a mounting plate, a frame or a mating piece.
You can see what a traced-and-redrawn result looks like next to its source on our samples page.
What to send if you have it redrawn
Whether you hand it to a coworker, a cutting shop or us, these make the difference between one round and three:
- The largest original image you have, not a screenshot or a file pulled from a text message.
- One known dimension, for example "the bracket is 4 inches wide" or "hole centers are 60 mm apart."
- Material and thickness, such as 1/8" aluminum or 1/4" plywood.
- Machine type: laser, plasma, waterjet or router.
- One part or a nested sheet, plus any parts that need to fit together.
The short version
Auto-trace in Inkscape, Illustrator or LightBurn is a good start for bold, simple shapes, as long as you clean up the result and check its size. For parts with real dimensions, rough photos, sketches or detailed logos, a redraw usually saves material and machine time.
If you'd rather skip the cleanup, here's how DXF Desk works: send the image with one real measurement, we confirm the price first, and you get closed-path DXF and SVG files back.
Originally published on the DXF Desk blog.