SVG to DXF for Laser Cutting and CNC

Vector artwork and machine toolpaths look like the same thing and aren’t. An SVG describes something to draw — fills, strokes, gradients, text, opacity. A DXF describes something to cut — geometry, and nothing else. Most of the trouble in converting between them comes from that gap.

Here’s what to set before exporting, what gets dropped on the way, and what to check before the material goes in.

Work in real units from the start

This is the single setting that prevents the most common failure. An SVG can describe its size in physical units or in pixels, and only the first survives the trip meaningfully.

In Inkscape, open File → Document Properties and set the document size in millimetres, with display units to match. Your drawing then carries a genuine physical size, and the root element ends up reading something like width="200mm". In Illustrator, set the artboard units before you start rather than converting afterwards.

The difference shows up in the file itself:

<!-- Carries a real-world size. 200 mm is 200 mm. -->
<svg width="200mm" height="100mm" viewBox="0 0 200 100">

<!-- Carries pixels. Someone downstream has to assume a resolution. -->
<svg width="200" height="100">

With pixels, a converter has to pick a resolution to translate them, and different tools historically picked differently — 96 dpi is the CSS standard, but Inkscape used 90 before version 0.92 and Illustrator has long treated SVG as 72. That’s where parts that arrive a third too large come from. Why your DXF imports at the wrong size covers the diagnosis in detail.

Convert everything to paths

DXF has no concept of fonts. If your design contains text and you export it as text, one of two things happens: the letters vanish entirely, or they arrive as an entity your machine software renders in some default face that isn’t the one you designed with.

Convert text to outlines before exporting — Path → Object to Path in Inkscape, Type → Create Outlines in Illustrator. Do it on a copy, because the text stops being editable the moment you do.

The same applies to anything else that isn’t literally a path: shapes built from live effects, blends, symbols, and clones should be flattened or expanded first. What you want reaching the exporter is plain geometry.

Understand what a cut actually follows

A laser follows the path, not the appearance of the path. This trips people up in a specific way: stroke width is irrelevant. A 5 mm-wide stroke and a hairline stroke describe the same cut line, because the machine cuts along the centre of the path either way.

That has a consequence worth internalising. If you drew a shape as a thick stroke expecting the laser to cut both edges of it, you’ll get one cut down the middle instead. To cut both sides you need the stroke expanded into a filled outline first — Path → Stroke to Path in Inkscape — which turns one line into two, one for each edge.

Fills don’t transfer at all. A filled region is just a closed path as far as DXF is concerned; whether it’s engraved, cut, or ignored is decided by the settings you assign in your laser software after import.

Close the paths you meant to close

An open path is one whose start and end points don’t meet. On screen with a fill applied, it can look completely closed — the renderer simply draws the fill as if the gap were bridged. A cutting job doesn’t get that courtesy: the laser reaches the end of the path and stops, leaving your part attached to the sheet by whatever the gap was.

Before exporting, check for stray nodes and unjoined endpoints. In Inkscape, selecting all nodes in a path and using Join selected nodes closes small gaps. In your laser software, most importers will highlight open contours — LightBurn’s “Show open shapes” style check is worth turning on as a habit.

Curves become polylines

SVG describes curves as Béziers. Most SVG-to-DXF conversions approximate them with a series of straight segments — a polyline — rather than mapping them to a curve entity, and the number of segments decides whether the result looks smooth or faceted. R12 has no curve entity at all, and even in later revisions polylines are the safer interchange, because machine controllers vary in how well they handle splines.

For most work this is invisible; the segments are far finer than the kerf. It becomes visible on large-radius curves, where a coarse approximation shows as flat spots. If you see faceting on a cut piece, the fix is at the export stage, not in the machine.

A related consequence: file sizes grow. A single elegant Bézier becomes dozens of coordinate pairs. This is normal and not worth optimising unless you’re hitting a controller’s memory limit.

What doesn’t survive the conversion

Plan around these rather than discovering them after import:

In your SVG In the DXF
Paths, lines, polygons, rectangles, circles, ellipses Converted to geometry
Bézier curves and arcs Flattened to polylines
Text Only if converted to paths first
Fills and gradients Dropped — DXF stores geometry, not appearance
Stroke width and colour Dropped
Embedded or linked images Dropped
Clipping paths and masks Dropped
Opacity, blend modes, filters Dropped

Nothing on the “dropped” side is a bug. DXF is a geometry interchange format; appearance is the receiving software’s job.

Before you cut

Two checks, both quick, both worth the habit:

Measure a known feature. Pick something whose dimension you’re certain of — an overall width, a hole spacing — and measure it in your CAM software after import. This catches every unit and scale problem in one step, and it’s the only check that reliably does.

Look for open contours and duplicates. Duplicate paths stacked on top of each other are common when artwork has been copied between documents, and they cause the laser to cut the same line twice — wasting time, widening the kerf, and occasionally scorching the edge.

Converting your files

SVG to DXF does the conversion in your browser. It reads paths, lines, polylines, polygons, rectangles, circles and ellipses, applies their transforms, flips the Y axis — SVG measures Y downward and CAD measures it upward — and writes the DXF at true size.

It honours a physical size when your SVG declares one, falls back to the CSS-standard 96 dpi when the artwork only carries pixels, lets you choose millimetres or inches, and displays the finished real-world dimensions before download so the measurement check above is already done for you. The default output is AutoCAD 2000 format — the oldest revision that can record the unit in the file itself — with R12 available for older controllers that need it.

Nothing is uploaded and there’s no size limit or queue, which matters when you’re iterating on a design and converting the same file repeatedly.

If your starting point is a raster image rather than vector artwork — a logo as a PNG, a scanned drawing — you’ll need to trace it to vector first. PNG to SVG and JPG to SVG do that, though be realistic about the result: tracing a photograph produces thousands of clumsy paths that no machine wants to cut. Tracing works well for clean, high-contrast line art and logos, and poorly for anything else.

Share