Image to G-code Converter: a practical guide
G-code is what your laser or CNC controller actually runs. Image to G-code skips the CAM step for simple jobs: your picture becomes a toolpath you can send straight to GRBL or Mach3.
The program is written conservatively, tool off before every move and retracted before every rapid, and you can watch the toolpath drawn before downloading, cuts solid and rapids dashed.
Image and G-code: what changes
- Image: Any picture file: a PNG, a JPG, a WebP, a HEIC from a phone or a scan. A picture is pixels, so it has to be traced or redrawn before a machine or a vector program can use it.
- G-code: Motion commands a controller runs directly: move here, at this speed, with the tool on. No interpretation left. The machine does exactly what the file says.
How the Image to G-code converter works
Your image is first traced in the browser into clean outlines. For a machine the trace is set up for cutting rather than colour: one outline where a cutter should go, with photos turned into line art instead of blotchy shapes.
The outlines are then scaled to the real size you choose and written as a G-code. The G-code is conservative: the tool is off before every reposition, retracted before every rapid, and the program ends tool-off and clear. You can see the toolpath before you download, cuts solid and rapids dashed.
What the G-code is used for
- Laser cutting and engraving
- CNC routing
- Sending straight to the controller
Why convert Image to G-code here
- Real units in the file. G-code output carries millimetres or inches, so it imports at the size you set.
- The right way up. Image coordinates run downwards; machine coordinates run upwards. The conversion flips them so the part is not mirrored.
- Closed contours. Outlines join up, and anything that does not is flagged before you download.
- Preview the machine file itself. The download is parsed back and drawn, so what you see is what the machine will get.
Tips for the best G-code
- If you have the same picture in several formats, PNG is usually the cleanest source.
- High-contrast image artwork gives the cleanest toolpaths: dark shapes on a light background.
- Set the finished width in the settings before downloading, then check the size the page reports.
- For a laser, decide whether each shape should be cut or engraved in your laser software; the file gives you clean outlines for either.
On the blog: How to Convert Image to G-code Free, Step by Step
How it works
Upload your artwork
Mono mode is preset, a single cut outline is what a machine wants, not colour layers.
Set your real size
Choose millimetres or inches and the finished width. The file carries physical units, not pixels.
Check the preview, then cut
Inspect the toolpath before you download. Cuts draw solid, rapids dashed.
Image to gcode: image to gcode converter, png to gcode
Image to gcode two ways: trace the shapes for cutting, or engrave the picture line by line with power following the shading. This image to gcode converter handles png to gcode and jpg to gcode, and photo to gcode laser engraving with dithering for wood and slate.
Looking for image to gcode converter freeware? This runs in the browser with nothing to install, and is an image to cnc file online free to try: G-code for GRBL, Mach3 and most hobby controllers, or a DXF for your CAM.
What G-code needs that a PNG does not have
A PNG is pixels with no size; G-code is moves in millimetres or inches with a feed rate and, for a laser, a power. So the converter asks for the real width, the units, the speed and the power, and writes them into every line.
Convert an image to G-code (step by step)
Drop a PNG, JPG or SVG; choose laser or router; set the finished size, units, feed rate and power (or cut depth); check the preview, where cuts draw solid and travel moves dashed; then download the .gcode or .nc file.
Supported inputs and outputs (PNG, JPG, SVG, DXF to .nc.gcode)
Pictures (PNG, JPG, WebP, HEIC and more), vectors (SVG, EPS, PDF) and drawings (DXF) go in; G-code comes out as .gcode or .nc, written for GRBL-style controllers, with % delimiters available for Fanuc-style ones.
Common mistakes: wrong units, inverted Z, dithering
A part that comes out 25.4 times too big or small was cut in the wrong units; check G21 (mm) or G20 (inches) at the top. On a router, cut depth is negative (into the stock). For engraving a photo, choose a dithered or shaded mode; an outline trace engraves edges only.
Image to G-code for laser engraving
Outlines become vector passes for cutting and scoring, and you set the feed rate, power and passes before you download.
Set origin, work area and feed rate
Choose where zero is and the size of the work in mm, so the job lands where you put the material.
Why your G-code runs off the edge of the bed
Usually a units mix-up (inches read as mm) or an origin in the wrong corner. Set the size in mm and check the preview against your bed.
G-code vs DXF: which one your machine wants
A GRBL laser or CNC runs G-code directly; LightBurn, a CAM program or a laser with its own software usually wants DXF or SVG instead.
Also searched as: image to cnc file online, image to cnc file free, convert image to cnc file online, image to cnc file converter online, image to cnc file converter free, image to cnc file free download.
Why it matters
Correct units, stated in the file
DXF exports write $INSUNITS. Without it a part imports at 25.4x the intended size, which is the single most common cause of a ruined first cut.
Y axis the right way up
SVG puts +Y down the screen; CAD and CAM put it up. We flip it. Exporting without that correction gives a part mirrored about the X axis, it cuts, but backwards.
Closed contours
A cutter following an open outline leaves the part attached. Outlines are closed, and anything that is not is flagged before you download.
Conservative G-code
The tool is disengaged before every reposition, retracted before every rapid, and the program always ends tool-off and clear.
Is Image to G-code worth paying for?
A G-code is the file a shop actually runs. Walk through the
artwork requirements a laser cutter, a CNC shop or a sign maker
publishes and the same request appears: send something a machine can
follow. What turns up instead is a screenshot or a logo pulled off a
website at 600 pixels, and somebody redraws it by hand, twenty-five to forty minutes, or sends it to
an art service at $25 to $60 a file.
The conversion and the preview here are free and
unlimited. The G-code itself is $3.99 as a guest, with
no sign-up, or comes with a plan, and it arrives clean: a machine file
is never watermarked, because a mark in a cut file is extra cut paths
a machine would run.
What the plan includes
Reviews
No reviews yet. Used this tool? Yours could be the first.
Used this tool? Sign in to write a review.
Something not right with this tool? Raise a support ticket and a person will look into it.
Questions
How do I convert Image to G-code?
Drop your image into the box at the top of this page and press Convert to G-code. The conversion runs in your browser in a few seconds. Check the result, then download a G-code.
Should I trace or engrave a photo?
Engrave. A traced photo becomes blobs; engraving burns the tones as dots or varying power.
What is the best image for laser engraving?
A high-contrast image at 300 pixels per inch or more at the finished size. For photos, use a dithered mode (Floyd-Steinberg or Atkinson) so tones become dots the laser can burn.
Why is my G-code the wrong size?
Usually units: a file in inches read as millimetres is 25.4 times too small. Set the finished width and units here, and check the controller is in the same units.
Can I edit the G-code after export?
Yes. It is plain text: open it in any text editor or in your sender (UGS, LightBurn, Candle) to change feed rates or power.
What units does the file use?
Whichever you pick, millimetres or inches, and the choice is written into the file header so the receiving software does not have to guess.
Will this work with my laser?
DXF is written as R2000 by default, which LightBurn, Fusion, AutoCAD and current CAM packages all read. There is an R12 option for older controllers that predate LWPOLYLINE.
Can I trust the G-code?
Preview the toolpath first, and dry-run any new program above the material. The generated code assumes you have set your own work origin, and it homes nothing.
Related tools: SVG to G-code · PNG to G-code · Logo to DXF · PDF to DXF · Background Remover · SVG Optimizer · Image to SVG
Reading on G-code and machine files
Image to G-code: here, by hand, or on a server
More converters and tools
Ready to convert your Image?
Free, unlimited, no account, and nothing leaves this tab.
Convert a Image now