ResourceBunk Logo ResourceBunkBlogAboutContact
All Posts

July 1, 2026 · 0x1da49

DXF vs SVG for CNC: The Complete Format Comparison Guide (2026)

Choosing the wrong file format before you hit Run on your CNC machine is a costly mistake. A mismatched format can corrupt toolpaths, lose tolerances, and waste material. This guide gives you the full technical picture so you can pick the right format every time — and understand exactly what you're getting in every ResourceBunk download.


What Are DXF and SVG, Really?

Before comparing them, it helps to understand what each format actually is under the hood.

DXF — Drawing Exchange Format

DXF was created by Autodesk in 1982 as an interchange standard for AutoCAD drawings. It is a plain-text (or binary) document structured in sections, each describing entities such as lines, arcs, polylines, and splines in an absolute coordinate space. The current standard is DXF R2018 (AC1032).

Key structural facts:

SVG — Scalable Vector Graphics

SVG is a W3C open standard first released in 2001 and now at version 1.1 (SVG 2.0 is a draft). It is XML-based and describes geometry using a viewport coordinate system measured in user units, with optional physical units (mm, in, px) defined on the root <svg> element.

Key structural facts:


Head-to-Head Comparison

PropertyDXFSVG
File structureSections + entity groupsXML tree
Coordinate precision64-bit float (≈15 sig. figures)32-bit float in most implementations
Native physical unitsYes ($INSUNITS header)Optional (viewBox / width in mm)
Curve representationTrue splines & arcsCubic Bézier approximations
Layer supportYes (unlimited named layers)Yes (<g> + id or Inkscape layers)
Colour / stroke infoMinimal (ACI index)Full CSS colour model
CAD software importNative (Fusion 360, AutoCAD, VCarve)Via import plugin or converter
Vector editor importVia plugin (Illustrator, Affinity)Native
Browser renderingNo (requires plugin)Native
File size (same geometry)~10–40 % smallerLarger (verbose XML)
Human-readableYes (plain text sections)Yes (XML tags)
Script/batch processingModerate (ezdxf, pyautocad)Easy (lxml, BeautifulSoup, sed)
Revision control (git diff)Workable (text mode)Excellent (XML diffs clearly)

Tolerance and Precision: Why It Matters for CNC

CNC routing works in real-world millimetres. A 0.1 mm tolerance error on a door panel joint means the panel won't assemble. Here is where DXF has a fundamental advantage.

DXF Precision

A DXF LWPOLYLINE vertex stores X and Y as double-precision floats:

 10
250.000000000000
 20
0.000000000000

No rounding, no unit conversion ambiguity — provided $INSUNITS is set to 4 (millimetres).

SVG Precision Pitfalls

SVG path data looks precise but hides several traps:

  1. viewBox scaling: If your SVG has width="600px" and viewBox="0 0 600 600", but your software interprets 1 user unit as 1 px (96 dpi), the geometry is scaled to 600 × 0.2646 = 158.76 mm — not 600 mm. This is the most common scale error.
  2. Bézier approximation: A DXF ARC is a perfect arc. An SVG arc (A path command) is stored as a true arc, but when software converts SVG to toolpaths, it tessellates the arc into Bézier segments, adding micro-errors at junctions.
  3. Transform stacking: Nested <g transform="translate(...)"> elements multiply transforms. After three levels of nesting, cumulative floating-point rounding can shift vertices by 0.01–0.05 mm.

Bottom line: For anything requiring ±0.1 mm or better, always verify your SVG import dimensions with a caliper or use DXF instead.


Software Compatibility Matrix

CAM / CNC Software

SoftwareDXF supportSVG supportNotes
Fusion 360✅ Native⚠️ Via converterSVG import is indirect
VCarve Pro / Aspire✅ Native✅ NativeBoth work well
Mach3 / Mach4✅ Via CAM plugin❌ No direct support
LinuxCNC✅ Via pycam / heekscncDXF strongly preferred
RDWorks (CO₂ laser)✅ Limited✅ GoodColour-based layer power control via SVG
LightBurn✅ Good✅ ExcellentLightBurn is SVG-first for laser
SheetCAM✅ Native⚠️ Partial
Carbide Create✅ Native✅ Native
Easel (Inventables)✅ Native✅ Native

Vector Editing Software

SoftwareDXF supportSVG supportNotes
Inkscape 1.x✅ Via extension✅ NativeInkscape is SVG-native
Adobe Illustrator✅ Native✅ NativeDXF import can lose stroke weights
Affinity Designer 2✅ Native✅ NativeBoth excellent
CorelDRAW✅ Native✅ Native
AutoCAD / LT✅ Native⚠️ Via pluginAutoCAD is DXF-native

Machine-Specific Recommendations

CNC Router (Wood / MDF / Acrylic)

Use DXF. Routers require exact toolpath geometry. VCarve Pro and Fusion 360 both consume DXF natively. The geometry preserves true arcs and splines, meaning fewer segmentation errors on curved profiles.

Recommended workflow:

  1. Load .dxf in VCarve Pro or Fusion 360 CAM
  2. Set document units to mm and confirm drawing dimensions before placing toolpaths
  3. Apply profile (contour) toolpath for outside/inside cuts; pocket toolpath for recessed areas
  4. Post-process to your controller format (GRBL .nc, Mach3 .tap, etc.)

CO₂ Laser Cutter (Wood / Acrylic / Leather)

SVG preferred for colour-mapped power control. Most laser software (LightBurn, RDWorks) maps SVG stroke colour to laser layers. A red stroke cuts, a blue stroke engraves — this is impossible to express cleanly in DXF.

Recommended SVG layer colour conventions (ResourceBunk follows these):

Plasma Cutter (Steel)

Use DXF. Plasma CAM software (SheetCAM, Mach3 Plasma) is DXF-first. SVG imports are rare and unreliable on plasma-specific CAM. Plasma cutting also demands exact lead-in/lead-out geometry that DXF entities handle better.

Vinyl Plotter / Sign Cutter

Use SVG. Sign-cutting software (SignCut, Sure Cuts A Lot, Silhouette Studio) is SVG-native. The colour model also lets you define cut contours vs. print layers.

Fibre Laser (Metal)

Use DXF. Fibre laser controllers (EZCAD, JPT, MOPA) consume DXF directly and require exact coordinate spaces. SVG is not standard on fibre systems.


Script and Batch Processing

Processing DXF with Python (ezdxf)

import ezdxf

doc = ezdxf.readfile("panel_v01.dxf")
msp = doc.modelspace()

for entity in msp:
    if entity.dxftype() == "LWPOLYLINE":
        print(f"Polyline with {entity.dxf.count} vertices")
        print(f"  Closed: {entity.is_closed}")

ezdxf gives you full read/write access to any DXF entity. Useful for batch-renaming layers, stripping non-cutting geometry, or programmatically scaling 600 designs to a custom door size.

Processing SVG with Python (lxml)

from lxml import etree

tree = etree.parse("panel_v01.svg")
root = tree.getroot()
ns = {"svg": "http://www.w3.org/2000/svg"}

for path in root.findall(".//svg:path", ns):
    d = path.get("d")
    stroke = path.get("stroke", path.get("style", ""))
    print(f"Path stroke={stroke}, d length={len(d)}")

SVG's XML structure makes it trivial to filter by colour, group, or ID — ideal for automating laser power assignments or generating web preview images.


File Size and Storage

For the same parametric door panel geometry (600 mm × 2100 mm, 48 variations):

FormatAvg. file size600-file bundle
DXF R2018 (ASCII)~18 KB~10.8 MB
SVG (uncompressed)~24 KB~14.4 MB
SVGZ (gzip compressed)~7 KB~4.2 MB

ResourceBunk ships uncompressed SVG for maximum compatibility. If storage is a concern, batch-compress with gzip -9 *.svg to get SVGZ files most software handles natively.


What ResourceBunk Ships — and Why Both Formats

Every ResourceBunk product includes:

The dual-format approach means you are never stuck converting. Run the DXF straight into VCarve for routing. Open the SVG in LightBurn for laser cutting the same design the same day.


Common Pitfalls and How to Avoid Them

Pitfall 1: SVG opens at the wrong scale

Cause: Software interprets SVG user units as pixels (1 px = 0.2646 mm at 96 dpi).

Fix: In Inkscape, check File → Document Properties → Display Units. In LightBurn, set Edit → Settings → SVG Import to interpret units as mm. In Illustrator, confirm the artboard dimension after import.

Pitfall 2: DXF geometry appears in the wrong location

Cause: Geometry is placed far from the origin (common in files exported from full building drawings). VCarve and Fusion 360 may warn you.

Fix: In VCarve, use File → Import → Reposition to Centre. In Fusion 360, use Modify → Align to move geometry to the origin.

Pitfall 3: Curves become jagged after CAM import

Cause: CAM software tessellates curves into short line segments. Default chord tolerance is often 0.1–0.5 mm.

Fix: In VCarve, set File Settings → Curve Fitting Tolerance to 0.01 mm. In Fusion 360, set Manufacturing → Geometry Tolerance to 0.005 mm.

Pitfall 4: Double lines on laser cut

Cause: SVG paths have both a fill and a stroke, so the laser traces the path twice.

Fix: Ensure all cut paths have fill="none" and only a stroke colour. ResourceBunk SVG files ship with fills disabled on all cut layers.


Summary Decision Tree

Are you routing on a CNC router?
  └─ Yes → Use DXF
Are you cutting on a fibre or plasma?
  └─ Yes → Use DXF
Are you cutting on a CO₂ laser?
  └─ Do you need colour-based power layers?
       ├─ Yes → Use SVG
       └─ No → Either format works; DXF is safer for precision
Are you editing in Inkscape / Illustrator?
  └─ Use SVG
Are you embedding in a website?
  └─ Use SVG
Are you scripting a batch process?
  └─ SVG for filtering/modification; DXF for precision geometry

Both formats are included in every ResourceBunk purchase. Browse the full library on the home page and download a free sample pack to test in your CAM software before purchasing.

ResourceBunk Logo All Right Reserved.LicensePrivacy PolicyTerms and Conditions