Do CNC Machines Use SVG Files?
CNC machines read G-code, not SVG. SVG is a 2D vector format that CAM software can convert into toolpaths. This page explains where SVG fits in a machining workflow, which jobs it suits, and when to switch to DXF or STEP. Written for engineers and buyers who need to pick the right file before quoting.

Why CNC machines do not read SVG directly
A CNC controller executes G-code: a list of coordinates, feed rates, spindle speeds, and tool changes. SVG stores none of that. It stores shapes as mathematical paths — move, line, curve, close. Vector data, yes. Machine motion, no. The controller needs to know where the tool goes, how fast, and how deep. SVG says none of it.
So do CNC machines use SVG files? Not natively. Something has to translate the path into motion. That translator is CAM software, and the translation step is where most SVG headaches start. A path that looks perfect on screen can produce a toolpath that cuts air, doubles back, or dives deeper than expected.
The gap is dimensional. SVG lives on a flat plane with X and Y. Milling and turning need a third axis, and often a fourth or fifth. An SVG can describe a pocket outline, but it cannot tell you the floor depth, the corner radius in Z, or whether the feature is a through slot or a 3 mm engraving.
None of this makes SVG useless. It makes SVG a front-end format. Design in SVG, then let CAM assign the machining data. The file you send a shop is usually the output of that step, not the SVG itself.
How SVG paths turn into toolpaths
CAM software parses the SVG path data and rebuilds it as a chain of line and arc segments. Cubic and quadratic Bézier curves get flattened into many short lines. Tighter flattening tolerance means smoother curves and a heavier program. A 0.01 mm chord tolerance is fine for most engraving. Loosen it to 0.1 mm and small radii start to look faceted.
Once the chain exists, CAM applies a toolpath strategy. For a 2D contour it offsets the path by the tool radius, then adds lead-in and lead-out moves. For pocketing it generates a series of stepovers. For engraving it runs the tool center straight down the path. Each strategy needs data the SVG never carried: tool diameter, stepover, depth per pass, feed rate, spindle speed.
Stroke width matters more than most people expect. CAM often treats the stroke centerline as the cut line, so a 0.5 mm stroke and a 5 mm stroke can produce the same toolpath. Many shops ask for hairline strokes — around 0.001 mm — so there is no ambiguity about intent. Filled shapes are a separate case; CAM may treat a fill as a pocket rather than an outline.
Curve count is the other quiet issue. A file with thousands of tiny splines will post a huge program and slow the controller on look-ahead. Simplifying nodes before export usually cuts cycle time without changing the part.
- 1Flattening tolerance0.01 mm for smooth curves; 0.1 mm is visible on small radii
- 2Hairline strokeAbout 0.001 mm so CAM reads the centerline, not the stroke edge
- 3Node countFewer nodes, smaller G-code, faster look-ahead on the controller
Jobs where SVG files make sense
SVG shines on flat, 2D work where the outline is the part. Signs, plaques, engraved nameplates, panel cutouts, gaskets, stencils, and inlay pockets all fit. If the drawing is essentially a shape to be cut or marked on one face, SVG carries everything CAM needs except the machining parameters.
Laser cutting and waterjet are even better matches. Both are inherently 2D, both consume path geometry directly, and both care about kerf width more than Z depth. Router work on plywood, acrylic, or MDF follows the same logic. The toolpath is a contour or a pocket, and the SVG outline defines it cleanly.
Engraving is the sweet spot for metal parts. A logo or part number engraved on an aluminum housing starts life as a vector outline. CAM converts it to a shallow toolpath — typically 0.2 to 0.5 mm deep with a 30° or 60° V-bit or a 1 mm flat end mill. Vector data keeps the edges crisp at small sizes, which raster formats cannot do.
SVG is also handy for quick iteration. Designers can edit it in Inkscape or Illustrator, and a shop can re-post the toolpath in minutes. For one-off fixtures and shop aids, that loop is faster than a full CAD remodel.
Where SVG stops being the right format
Anything with depth needs more than SVG. A pocket with a specified floor, a counterbore, a stepped boss, a thread callout — none of that survives in a 2D path file. You can draw the top view, but the Z information has to come from somewhere else: a dimensioned drawing, a STEP model, or a written note.
Tolerances have no home in SVG either. There is no way to attach ±0.005 mm to a hole or a datum to a face. Shops work to a general tolerance by default, and a general tolerance is not the same as a specified one. If the feature is critical, the tolerance needs to live in a drawing or a 3D model.
Text is a recurring trap. SVG text elements depend on the font being installed on the reading system. If it is not, the text reflows or reverts to a default face. Convert all text to paths before export. The file gets slightly larger; the geometry stops moving.
Finally, SVG has no material or finish information. The same outline in 6061-T6 and in 316L stainless needs different speeds, feeds, and tooling. That data belongs in the quote request, not the vector file.
SVG vs DXF vs STEP for CNC work
DXF is the usual alternative for 2D. It is older, less pretty, and better understood by CAM and CAD tools. Units are explicit, layers are conventional, and most shops have a DXF import that behaves predictably. If your part is flat and you want the fewest surprises, DXF is the safer default.
STEP is the answer for anything 3D. It carries solids, surfaces, and true geometry in X, Y, and Z. A STEP file lets CAM derive toolpaths directly from the model, which removes the reinterpretation step that SVG requires. For a milled bracket, a turned shaft, or a 5-axis housing, STEP is the format to send.
The practical rule: SVG for 2D marking and cutting, DXF for 2D parts that need clean CAD data, STEP for anything with depth or tolerance. Many shops will accept SVG for engraving and still ask for a STEP or PDF drawing as the controlling document.
Conversion is not lossless in either direction. SVG to DXF can drop curve fidelity if the exporter flattens aggressively. DXF to SVG can lose layer structure. Check the converted file in a viewer before sending it, and compare a few key dimensions against the original.
Step by step: preparing an SVG for CNC
- 1Close every pathOpen contours cause skipped cuts. In Inkscape use Path > Combine, then check for stray end nodes.
- 2Convert text to pathsSelect all text and apply Path > Object to Path. Fonts will not substitute on the shop's system.
- 3Set strokes to hairlineAbout 0.001 mm. CAM reads the centerline, so stroke width stops affecting the toolpath.
- 4Simplify nodesNode Tool > Simplify, or set a flattening tolerance near 0.01 mm. Fewer nodes mean a smaller program.
- 5Check units and scaleConfirm the document is in millimeters and measure a known feature. A 25.4× scale error is common.
- 6Remove hidden layersConstruction lines and stray objects become cuts. Delete or hide them before export.
- 7Export and verifySave as plain SVG, reopen it, and zoom in on small radii to confirm the curves held.
Which file format fits which CNC job
Use this table to pick a format before you send files to a shop.
| Job type | Best format | Why | Watch out for |
|---|---|---|---|
| Engraving a logo or part number | SVG | Vector edges stay crisp at small sizes | Convert text to paths |
| Laser or waterjet cutout | SVG or DXF | Both are 2D path formats | Kerf width, open paths |
| Flat panel or gasket profile | DXF | Explicit units, standard layers | Duplicate overlapping lines |
| Pocket with a specified floor | STEP | Carries Z depth and features | Missing tolerance callouts |
| Turned shaft or bushing | STEP | Revolve geometry needs a solid | Datums must be defined |
| 5-axis housing or bracket | STEP | Full 3D geometry for toolpath | Surfaces must be watertight |
The verdict on SVG and CNC
If your part is flat and you only need a contour or an engraving, SVG is fine — convert text to paths, set hairline strokes, and send a PDF drawing alongside it for dimensions. If the part has depth, pockets, threads, or tolerance callouts, send STEP instead. Chasing an SVG through CAM for a 3D feature costs more time than remodeling it.
SVG and CNC questions engineers ask
Can I send an SVG file for a machined metal part?
Yes, if the part is essentially 2D — an engraved plate, a flat bracket outline, a panel cutout. We import the path, assign toolpaths, and machine it.
For anything with pockets, steps, or tolerances, we also need a PDF drawing or a STEP model. The SVG defines the outline; the drawing defines everything else.
Does the stroke width in my SVG change the cut?
Usually not. Most CAM importers read the stroke centerline as the cut line, so a 0.2 mm stroke and a 2 mm stroke produce the same toolpath.
That is also why we ask for hairline strokes. It removes ambiguity and makes the intent obvious to whoever loads the file.
Why did my curves come out faceted after machining?
The exporter likely flattened the Bézier curves with a coarse tolerance. Anything above roughly 0.05 mm chord deviation starts to show on small radii.
Re-export with a tolerance near 0.01 mm, or convert the curve to arcs if your CAD tool supports it. Arcs post cleaner than hundreds of short lines.
Is DXF better than SVG for CNC?
For 2D parts, generally yes. DXF carries explicit units and layer conventions that CAM tools handle predictably.
SVG is fine for engraving and quick marking jobs, and it is easier for designers to edit. Pick based on who needs to touch the file next.
How do I add depth to an SVG?
You cannot, inside the SVG itself. Depth comes from the CAM setup or from notes on a drawing.
A typical engraving runs 0.2 to 0.5 mm deep with a 30° or 60° V-bit. A through cut needs a material thickness and a tool diameter. Put both in the quote request.
Will you accept an SVG for a prototype order?
Yes. There is no minimum order quantity, so a single engraved panel or flat profile is a normal job for us.
Upload the SVG plus any drawing you have. We return a quotation and a free DFM analysis, usually within 12 hours.
Send your SVG, get a toolpath plan
Upload your vector file and any drawing. Our engineers check path closure, curve fidelity, and depth intent before quoting, so the first cut is the right cut.
12-hour quoteFree DFM analysisNo minimum orderNDA on request