Convert Image to G-code Online
Upload your image to convert to G-code
Drag & drop or click — PNG, JPG, WebP up to 25MB
“You are simply too good to be true.”
To convert image to G-code, upload your PNG, JPG, or SVG to VectoSolve and click Convert — the AI vectorizes edges and generates GRBL-compatible G-code. Output works with X-Carve, Shapeoko, 3018 engravers, OpenBuilds, and any CNC accepting standard G-code via UGS, Candle, or bCNC. Free preview, no signup; the G-code download comes with a plan, from $7.99/month.
A scan from a 1914 book, and the G-code this page wrote
A real conversion made with this page's own settings on 2 Oct 2026. The picture on the right is drawn from the file itself, nothing retouched.
- 28 closed cut paths, 946 mm of cutting
- 26 of those paths are specks of the old paper, under 10 mm
- 245.9 x 131.3 mm before you scale it
- GRBL G-code: LightBurn, LaserGRBL, UGS, Candle
The converter traces what is printed, specks included: delete the small loops in LightBurn before you cut, or start from a cleaner picture.


Scan: "Silhouettes to Cut in School", 1914, public domain
For GRBL routers and diode lasers
Drawing to G-code, with V-carving for line art
A drawing is lines, and a V-bit can follow them. In V-carve mode the bit runs once down the middle of each stroke and sinks as deep as the stroke is wide, so thick and thin lines come out as drawn.


What each machine receives
- G-code GRBL moves for UGS, Candle, LaserGRBL or bCNC, in millimetres with G21
- DXF the same geometry for VCarve or Fusion 360, when your CAM posts the code
- SVG for LightBurn, which drives a laser with no G-code file at all
- 1
Holes before outlines
Inner contours run first, so a part cannot drop or shift on the slats before its details are done.
- 2
Settings in the header
The opening lines list machine, feed, power or spindle speed, kerf and passes, for the operator to read before starting.
- 3
Safe moves on a router
The spindle starts once; every shape begins at a safe height, plunges, cuts and retracts before the next rapid.

Product photos are mockups: each design is the real VectoSolve file, not retouched. Source photos are public domain or CC0. Photo: Renardo la vulpo, Wikimedia Commons, CC0.
Custom · On quote
Top-of-market quality for complex jobs: large-format murals, detailed illustrations, photo to vector, multi-layer print files. Finished by hand by our team and checked before delivery.
No machine at the end of the job? The PNG to SVG converter turns any picture into an SVG, and the cut file converter keeps the paths ready to cut.
What G-code actually is — and why an image can't become it directly
G-code is not a picture format. It is a plain-text list of motion commands that your controller executes line by line: G0 for rapid travel with the tool off, G1 for a controlled cutting or engraving move, plus spindle/laser commands like M3 (on), M5 (off) and an S value that sets laser power or spindle speed. A GRBL board on an X-Carve, Shapeoko, or 3018 reads those coordinates and drives the steppers — it has no concept of pixels, colors, or fills.
That is why you can never drop a PNG or JPG straight into a GRBL sender. Between the image and the G-code sits a required step: the artwork has to be turned into paths (for cutting/scoring) or into a controlled power map (for photo engraving) before any coordinate can be written. VectoSolve does that trace step first, then emits GRBL-compatible G-code you can load into UGS, LaserGRBL, or Candle. If you only need the intermediate geometry to keep editing, the image-to-DXF and PNG-to-SVG routes give you the vector file instead of finished machine code.
Two completely different jobs: line/cut G-code vs raster engrave G-code
"Image to G-code" hides two very different outputs, and picking the wrong one is the most common beginner mistake:
- Vector (line-mode) G-code follows the outlines of your shapes. The tool moves along each contour once, at a set feed and power, to cut through or score the material. This is what you want for stencils, signage lettering, inlays, gaskets, and any part you intend to cut out. It produces short, efficient files with a handful of
G1passes per shape. - Raster (fill-mode) G-code sweeps the laser back and forth in a serpentine pattern, modulating the
Spower value per pixel so darker areas burn deeper. This is photo engraving — grayscale portraits on wood, slate, or anodized aluminum. These files are large (thousands of lines per image) and only make sense for surface marking, never cutting.
A logo or line drawing belongs in vector mode; a photograph belongs in raster mode. Feeding a photo into a vector tracer gives you a posterized, outlined interpretation — not a faithful engrave. Match the mode to the artwork before you generate anything.
Feed, power, kerf and passes — the numbers that decide the cut
Once geometry exists, four settings determine whether the part comes out clean or scorched. G-code bakes them straight into the file:
- Feed rate (mm/min on the
Fword): how fast the head moves during a cut. Too fast and a laser won't sever the material; too slow and a router bit burns or a laser chars the edge. Thicker or denser stock needs a lower feed. - Power / spindle (the
Svalue afterM3): for a diode or CO2 laser this is beam power, usually mapped 0-1000 on GRBL; for a CNC router it is spindle RPM. Cutting wants high power at low feed; scoring wants low power. - Kerf: the tool removes a real, finite width of material — a laser beam or a bit's diameter. If you cut exactly on the line, the finished part ends up smaller (or a hole larger) by roughly one kerf. Offsetting the path to compensate keeps interlocking and press-fit parts to size.
- Passes: thick plywood or acrylic often needs 2-4 repeat passes rather than one slow burn, which keeps edges cleaner and reduces flare-up.
Start from a known material test and adjust from there — a good feed/power pairing for 3mm acrylic is wrong for 6mm plywood. When you export a clean vector first via SVG for CNC or SVG for laser cutting, you keep the option to re-tune these numbers in your own CAM without re-tracing the art. And if your machine is a 3D printer rather than a cutter — no G-code from here at all: SVG for Bambu Lab turns the same artwork into AMS-ready multi-color layers that Bambu Studio slices itself.
Set your work zero, then dry-run before you ever fire the tool
G-code coordinates mean nothing until they're anchored to a physical origin on your machine. Two habits prevent almost every crash and ruined blank:
- Set work zero (G54) deliberately. Most GRBL generators, including VectoSolve's, emit coordinates relative to a lower-left origin, with the design extending up and to the right into positive X/Y. Jog the head to that corner of your stock and zero it there. If your sender or fixture expects center-origin, account for the offset — a mismatched origin sends the toolpath off the material or into a clamp.
- Frame and air-run first. Use your sender's outline/framing function to trace the bounding box with the laser off or the router raised, confirming the whole job fits the stock. For a router, a Z-safe air pass over the material catches a wrong depth before it gouges the spoilboard.
Also confirm units: GRBL runs in millimeters (G21) or inches (G20), and a file generated in one while your controller is set to the other lands 25.4x off. The G-code from this page is written in millimeters (G21) from the traced drawing, and the page has no width field: when the job must come out at an exact size, scale the DXF or SVG from the same download in your CAM and post the G-code from there. Either way, measure the framed rectangle against a ruler before the first cut.
From upload to finished run — the honest workflow
Putting it together, here is the realistic path from an image to a part on the bed:
- Prep the art: crop tight, boost contrast, and drop busy backgrounds. High-contrast logos, silhouettes, and line art trace into crisp cut paths; photos should go to raster engrave mode, not cut.
- Convert: upload to VectoSolve; the AI traces edges into clean paths (or a grayscale power map for engraving) and emits GRBL-compatible G-code with your chosen feed, power, kerf, and pass count.
- Set machine state: load the file in UGS, LaserGRBL, Candle, or your sender; confirm
G20/G21units, set work zero at the lower-left corner, and frame the job. - Verify, then run: do an air/dry run, watch the first few moves, and keep hands on the feed-hold. Add holding tabs on router profile cuts so parts don't break loose mid-pass.
If you would rather hand geometry to your own CAM and generate toolpaths there — for tabs, lead-ins, or nesting control your sender can't do — export a vector instead and post-process it yourself. The image-to-DXF route feeds Fusion 360, VCarve, and LightBurn directly, and you can sanity-check contours in the DXF checker before committing a sheet of stock.
When your CAM writes the G-code instead
Shops that already run a CAM package usually want the geometry, not finished machine code, so their own post-processor writes the G-code for their own machine. The traced artwork leaves here as a DXF or an SVG instead, and these pages cover that hand-off for the common programs:
- VCarve Pro: router signs, profiles, pockets and V-carving.
- Mastercam and ESPRIT: a traced drawing as the starting geometry for a machined part.
- LightBurn: lasers, where the software drives the machine directly and no G-code file is needed.
What Do Users Ask About This Converter?
9 questions about Image to G-code conversion
Upload your image (PNG, JPG, SVG) to VectoSolve. The AI vectorizes your image into clean paths and generates G-code commands that your CNC machine can execute for engraving, cutting, or milling.
The G-code works with GRBL-based CNC routers, 3018 engravers, X-Carve, Shapeoko, OpenBuilds machines, and any CNC that accepts standard G-code. Compatible with senders like UGS, Candle, and bCNC.
Yes! VectoSolve traces your photo into vector paths and generates G-code for laser or mechanical engraving. Works great for portraits, logos, and artwork on wood, acrylic, leather, and metal.
Yes, through a material preset in the converter: acrylic, plywood, MDF, leather, cardboard, fabric, engraving on wood or acrylic, V-bit engraving and V-carve. The G-code then carries that preset's feed rate, power, kerf offset and number of passes. The default, Generic, writes 1000 mm/min at power S800 out of 1000 with no kerf offset, for people who set their own values in the sender (UGS, Candle, LaserGRBL, LightBurn). Treat any preset as a starting point and test on scrap: the right numbers depend on your machine.
The preview is free with no signup; the G-code download is not. With any plan, Starter included, the download is a ZIP holding the G-code with the DXF, SVG and PNG of the same geometry; the Starter subscription is $7.99 a month for 25 conversions. For a one-off job, unlocking a single converted file costs $6.99, and you get the G-code on its own.
Yes, once it is scanned or photographed flat. Line art is the easiest case: choose a V-carve preset for a router, or a laser engraving preset, and the G-code follows the strokes.
A 60 or 90 degree V-bit to match the preset, X and Y zeroed on the bottom-left corner, and Z zeroed on top of the wood. The deepest cut is 3 mm.
After you choose a laser, router engraving or plasma preset, the converter shows an estimated cut time, the total path length and the number of paths or passes.
Yes. PNG is accepted directly, as are JPG and SVG. Bring the largest, cleanest copy you have, because the trace decides how smooth the toolpath will be.
Files for your trade
The same engine, set up for the machine or the shop you work with.
Where Can You Learn More About Image to G-code Conversion?
If CNC and routing is your business, you are probably paying per file.
An outside art service charges 6 to 26 dollars a logo and comes back the next day. Redrawing it yourself costs half an hour you could bill. A year here is $49 for 25 conversions every month, every machine format included, which works out cheaper than two outsourced logos.
Everything on this page stays free. This is only worth it if you do volume.