DXF to G-code – upload the drawing, download the program

Upload a DXF drawing, enter the cutting depth and tool, and step2gcode turns it into G-code: outside profile with holding tabs, cut-outs, holes – or engraving along the lines with a V-bit. In laser mode the same drawing is cut or engraved, holes first, with kerf compensation.

Before anything is calculated, the page checks the drawing: unit, open contours, lines drawn twice, parts narrower than the cutter. What does not fit is shown before you waste time. G-code for GRBL, Mach3/4, LinuxCNC and eleven more controllers. No installation, no account, first file free.

The tool does not load in this view without JavaScript. To convert a DXF to G-code, open www.step2gcode.com/en/dxf-to-gcode in your browser.

From drawing to machine in one step

Instead of importing the DXF into a CAM program, clicking every contour and setting up operations, step2gcode finds the outside profile, cut-outs and holes in the drawing itself. You enter material, tool and depth, check the tool paths in the 3D preview and download the program.

Where DXF files usually go wrong

  • Wrong unit: Many DXF files do not say whether they were drawn in millimetres or inches – the part comes out 25 times too large or too small. step2gcode reads the unit from the file, checks the size for plausibility and asks when it is not clear.
  • Open or duplicate contours: A gap of a hundredth of a millimetre and the contour is not closed; a line drawn twice and the cutter runs twice. The pre-check finds both and says what to do.
  • Geometry hidden in blocks: Some programs put the whole drawing into blocks or the paper layout. step2gcode resolves blocks (nested ones too, with position, scale and rotation) when the model space is empty – a title block beside real geometry is never milled.

DXF to G-code: the features

  • Lines, arcs, circles, polylines (with arcs), splines and ellipses
  • Unit from the file or chosen: millimetres, centimetres, metres, inches
  • Milling: outside profile with holding tabs, cut-outs, holes, ramped entry
  • Engraving along the line with a V-bit
  • Laser: cut or engrave, holes before the outline, kerf compensation
  • Parts or plate: for drawings with a frame, the page asks what is to be cut out
  • Arrange several DXF parts with quantities on one sheet (nesting)
  • G-code for 14 controllers, including GRBL, Mach3/4, LinuxCNC, Marlin and Heidenhain

Your drawing stays your drawing

Uploaded files are processed solely to create the program and deleted after 24 hours at the latest. No analysis, no sharing, no cookies. Hosted in Germany.

Frequently asked questions

How do I convert a DXF file to G-code?

Upload the DXF, choose milling or laser, enter the cutter diameter and the depth. step2gcode finds the outside profile, cut-outs and holes itself, shows the tool paths in a 3D preview and writes G-code for your controller. Feeds and spindle speed come from the material table and can be changed.

Why does a DXF need a cutting depth?

A DXF is a flat drawing without thickness, so you enter the depth yourself – usually the material thickness to cut parts out, or one or two millimetres to engrave. With a STEP file the depths come from the model instead.

My part is far too large or too small – what now?

Then the unit is wrong. The page shows the size of the part and lets you choose the unit (millimetres, centimetres, metres, inches). If the file does not state it, step2gcode estimates it from the size and asks.

What happens to open contours?

Cutting out needs closed contours. The pre-check reports open line chains; small gaps can be closed in CAD. If you only want to engrave along the lines, open lines work too.

Can I use a DXF with a laser?

Yes. In laser mode every closed contour is cut, inner ones before outer ones so the part does not come loose early, and the kerf is compensated. Engraving along the lines works as well. G-code for GRBL lasers and for Marlin (3D printers with a laser module).

Which controllers are supported?

GRBL, LinuxCNC, Mach3/Mach4, UCCNC, Marlin, Smoothieware, RepRapFirmware, Fanuc, Heidenhain, Centroid, Dynapath, Philips, EstlCAM and NCCAD.

What does it cost?

Uploading, checking, previewing and generating are free. Only the download is charged: your first file is free, after that a new file costs one credit. The same file stays free for good – with any settings.

Knowledge: STEP, DXF or SVG – which format for what?