Laser G-code from DXF, SVG and images

Upload your DXF or SVG file, choose cutting or engraving, and step2gcode generates ready-to-run laser G-code, with material presets for power and speed and kerf compensation for dimensionally accurate parts.

Photos and logos as PNG, JPG or WebP are engraved line by line (raster engraving): as a photo with dithering, as a logo in black and white, or in grayscale with power per dot. The preview shows what the laser will burn before you download.

The laser tool does not load in this view without JavaScript. To generate G-code, open www.step2gcode.com/laser in your browser.

From vector to cut in a single pass

As with slicing in 3D printing, the detour through a separate CAM or laser package disappears: upload the file, pick mode and material, download the G-code. The contour selection decides whether everything, only outer or only inner contours are cut.

What hurts about the classic route to a laser job

  • Extra software for every step: Draw here, convert there, set parameters in a third program. Here everything happens in one browser tab.
  • Dimensional error from the kerf: Without kerf compensation, parts come out half a beam width too small. step2gcode offsets the path automatically.
  • Power and speed by trial and error: The material presets provide proven starting values for cutting and engraving instead of sacrificing scrap material.

Laser features at a glance

  • Cutting and engraving from DXF and SVG
  • Image raster engraving from PNG, JPG, WebP, BMP, GIF and TIFF: photo (dithering), logo, grayscale
  • Image vectorisation: outline, centerline or photo edges – the laser follows lines instead of rows
  • Kerf compensation for dimensionally accurate parts
  • Contour selection: all, outer only or inner only
  • Material presets for power and speed
  • Nesting: multiple parts space-efficiently on one sheet
  • Laser G-code for GRBL and Marlin

Frequently asked questions

Can I laser a photo or image?

Yes. PNG, JPG, WebP, BMP, GIF and TIFF are uploaded like a DXF file and engraved line by line. There are three methods: photo (dithering, dots in two power levels – works on almost every material), logo/text (black and white along a threshold) and grayscale (power per dot). Size in millimetres, line interval, brightness, contrast and gamma are adjustable; the preview shows what the laser will burn before you download. Phone photos are turned upright automatically, transparent areas stay blank.

Is there anything faster than row by row?

Yes, vectorisation: the laser then follows lines instead of scanning every row – often 5 to 20 times faster. There are three methods: outline (the edges of dark areas, for logos and silhouettes), centerline (one line through each stroke, for drawings and handwriting) and photo edges (turns a photo into a line drawing). Areas stay empty; a minimum size filters out crumbs, and the preview shows the number of lines and the running time.

Which controllers is the laser G-code for?

For GRBL (M4, dynamic power, $32=1) and Marlin (M3 I, inline power, needs LASER_FEATURE in the firmware). The file header states what the machine must be set to in each case, including the S-value maximum ($30 or CUTTER_POWER_UNIT).

Can I laser directly from SVG files?

Yes. SVG graphics (e.g. from Inkscape or Illustrator) are processed as vector contours just like DXF and can be cut or engraved directly, without a detour through a CAD program. A logo from Inkscape becomes a finished laser job in minutes: upload the SVG, choose engraving, set a material preset, download the G-code.

What is kerf compensation?

The laser beam removes a small cutting width, typically 0.1 to 0.2 mm. Without compensation, outer parts come out too small and holes too large. step2gcode offsets the path automatically by half the kerf so the dimensions are correct.

Can I cut only the outer or only the inner contours?

Yes, the contour selection has three levels: cut everything, only the outermost contours (e.g. an enclosing rectangle) or only the inner ones (e.g. lettering inside a frame). Nesting levels are detected automatically.

Does nesting also work in laser mode?

Yes. Multiple DXF and SVG parts with quantities are arranged space-efficiently on the sheet (with rotation and adjustable spacing) and cut in a single job.

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