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:
- Coordinates are stored as 64-bit floating-point values — no rounding
- Native support for LWPOLYLINE, SPLINE, ARC, CIRCLE, and HATCH entities
- Supports layers, blocks (reusable geometry), and XREFs
- Unit system is explicit: millimetres, inches, or unitless (defined in the
$INSUNITSheader variable) - No native colour model beyond ACI (AutoCAD Color Index, 256 colours) — not relevant for machining
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:
- Supports
<path>,<rect>,<circle>,<ellipse>,<line>,<polyline>,<polygon> - All complex curves are reduced to cubic Bézier segments (
dattribute path commands:C,S,Q,T,A) - Supports CSS styling, transforms, groups (
<g>), and<use>for symbol reuse - Colours, strokes, and fills are first-class attributes — important for laser cut power mapping
- Viewport units can drift if
viewBoxandwidth/heightare mismatched — the #1 cause of scale errors
Head-to-Head Comparison
| Property | DXF | SVG |
|---|---|---|
| File structure | Sections + entity groups | XML tree |
| Coordinate precision | 64-bit float (≈15 sig. figures) | 32-bit float in most implementations |
| Native physical units | Yes ($INSUNITS header) | Optional (viewBox / width in mm) |
| Curve representation | True splines & arcs | Cubic Bézier approximations |
| Layer support | Yes (unlimited named layers) | Yes (<g> + id or Inkscape layers) |
| Colour / stroke info | Minimal (ACI index) | Full CSS colour model |
| CAD software import | Native (Fusion 360, AutoCAD, VCarve) | Via import plugin or converter |
| Vector editor import | Via plugin (Illustrator, Affinity) | Native |
| Browser rendering | No (requires plugin) | Native |
| File size (same geometry) | ~10–40 % smaller | Larger (verbose XML) |
| Human-readable | Yes (plain text sections) | Yes (XML tags) |
| Script/batch processing | Moderate (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:
- viewBox scaling: If your SVG has
width="600px"andviewBox="0 0 600 600", but your software interprets 1 user unit as 1 px (96 dpi), the geometry is scaled to600 × 0.2646 = 158.76 mm— not 600 mm. This is the most common scale error. - Bézier approximation: A DXF
ARCis a perfect arc. An SVG arc (Apath 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. - 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
| Software | DXF support | SVG support | Notes |
|---|---|---|---|
| Fusion 360 | ✅ Native | ⚠️ Via converter | SVG import is indirect |
| VCarve Pro / Aspire | ✅ Native | ✅ Native | Both work well |
| Mach3 / Mach4 | ✅ Via CAM plugin | ❌ No direct support | |
| LinuxCNC | ✅ Via pycam / heekscnc | ❌ | DXF strongly preferred |
| RDWorks (CO₂ laser) | ✅ Limited | ✅ Good | Colour-based layer power control via SVG |
| LightBurn | ✅ Good | ✅ Excellent | LightBurn is SVG-first for laser |
| SheetCAM | ✅ Native | ⚠️ Partial | |
| Carbide Create | ✅ Native | ✅ Native | |
| Easel (Inventables) | ✅ Native | ✅ Native |
Vector Editing Software
| Software | DXF support | SVG support | Notes |
|---|---|---|---|
| Inkscape 1.x | ✅ Via extension | ✅ Native | Inkscape is SVG-native |
| Adobe Illustrator | ✅ Native | ✅ Native | DXF import can lose stroke weights |
| Affinity Designer 2 | ✅ Native | ✅ Native | Both excellent |
| CorelDRAW | ✅ Native | ✅ Native | |
| AutoCAD / LT | ✅ Native | ⚠️ Via plugin | AutoCAD 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:
- Load
.dxfin VCarve Pro or Fusion 360 CAM - Set document units to mm and confirm drawing dimensions before placing toolpaths
- Apply profile (contour) toolpath for outside/inside cuts; pocket toolpath for recessed areas
- 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):
- Red
#FF0000— through-cut (full power) - Blue
#0000FF— engrave / score (reduced power) - Green
#00FF00— mark only (minimum power)
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):
| Format | Avg. file size | 600-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:
- 600 DXF files — one per design variation, exported at 1:1 mm scale,
$INSUNITS = 4 - 600 SVG files — same geometry, colour-coded by layer,
viewBoxmatched to mm dimensions - 5-file sample pack (DXF + SVG) — free download before purchase
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