How to
Convert an SVG or DXF to G-code for your CNC router
A DXF or SVG is a drawing. Your router needs G-code: a list of moves with depths, feeds and spindle speed. Turning one into the other is what CAM software does, and in Cutline Studio it takes a few minutes: open the file, check its size, say which shapes are cut out, which are holes and which are pockets, set the bit and depth, and save the G-code for Grbl or Mach3. Check the size first with SVGs. Inkscape saves at 96 pixels per inch and older Illustrator files at 72, so a file read at the wrong one comes in a third too big or a quarter too small.
Updated November 23, 2026.
1. Open your drawing
In Cutline Studio, open the CAM tab and load your DXF or SVG. DXF lines, arcs, polylines, circles, splines and blocks are read; SVG paths, shapes and transforms are read too. Cutline joins touching segments into closed shapes, so a part drawn as separate lines still cuts as one piece. Check the size: SVGs exported at the wrong scale are the most common surprise, and you can scale the artwork before cutting.
2. Tell it what each shape is
- Outside profile: parts you want to cut out. The bit runs outside the line so the part comes out at the drawn size.
- Inside profile: holes and slots. The bit runs inside the line.
- Pocket: areas cleared to a depth, like a recess or a dado.
- Engrave: the bit follows the line itself, for lettering and markings.
- Drill: holes at points, with optional pecking.
In Basic mode, Cutline walks you through this one question at a time: which shapes are parts, which are holes, which are pockets.
3. Set the bit, depth and speeds
Enter your bit diameter and material thickness. Cutline suggests a depth per pass, feed rate, plunge rate and spindle speed for your machine; through-cuts go slightly into the spoilboard so parts come free. If you use a trim router, it tells you the dial setting.
The settings from that screenshot, for a real sheet on an Apprentice 404 with a 1/4 inch bit:
| Setting | Value |
|---|---|
| Operation | Outside profile (10 outside cuts on this sheet; the 18 inside cuts are a separate toolpath) |
| Bit diameter | 0.25 in |
| Target depth | 0.7386 in |
| Step down per pass | 0.25 in |
| Tab height / length | 0.1447 in / 0.5 in |
| Feed rate / plunge rate | 194.4 in/min / 77.76 in/min |
| Spindle speed | 18,000 rpm |
| Direction | Climb |
These are a starting point for that machine, not a rule. For other bits and plywood, see feeds and speeds for plywood.
4. Add tabs and dogbones
Tabs are small bridges left at the bottom of a profile so the part doesn't move during the last pass. Dogbones are small round-outs in inside corners so square tenons fit, since a round bit can't cut a sharp inside corner.
5. Check the toolpaths and save
Look over the toolpaths in the 2D view, press Optimize to shorten the travel between cuts, and save the G-code. Open it in your machine's sender (Candle, gSender, UGS, Carbide Motion, Mach3/Mach4) and run an air cut first if it's your first file on that machine. On a Grbl, grblHAL or FluidNC machine you can skip the save and run the job from Cutline Studio's Machine tab instead (Cutline Control, beta); for Mach3/Mach4, save the file and load it in Mach. More on that in Grbl and Mach3 software.
Common problems
- Parts come out too small: the shape was set to inside profile instead of outside.
- Shape won't pocket: the outline isn't closed. Cutline closes tiny gaps; a big gap needs fixing in the drawing.
- Everything is tiny or huge: the file's units were wrong on export. Scale it once, then save the file again in your drawing program at the right units.
No drawing yet? Cutline can design one for you from a description. Try it free in your browser, or read about Cutline's CAM features.
More guides: CNC software for beginners · G-code generator · plywood joints that fit · holding tabs · dogbone fillets · nesting · all guides
FAQ
Can I convert an SVG from Inkscape to G-code?
Can I use a DXF from Fusion?
What file does my machine need?
Try Cutline Studio
Design one project free in your browser, or download the 7-day free trial for Windows 10 and 11.