Follow this tutorial and get to know how to create G-Code file with Inkscape for the GRBL engraving maching.  Here is a content list since this is a very long article.


Let’s make it simple: The G-code is the most widely used programming language used for Computerized Numerical Control (CNC), such as milling, 3d printing, engraving router kit.

That means if you want to engrave text or image on a wood, you need to convert the text or image to G-code file first, and then the engrave machine will read the code to do the job.

Here is a professional article on Wikipedia:  G-code

So now we know we need G-code file before engraving, then the question is “HOW TO CREATE G-CODE FILE”, or “HOW TO CONVERT IMAGE OR TEXT TO G-CODE FORMAT”.

You can code the G-CODE file manually if you are a professional coder, but it’s a big pain for starters. So we need to use software to help us with this.

First of All: we need to download a software which the name is: InkScape.

The Inkscape is the very easy to use software for starters to create G-code file. It’s an open-source vector graphic software can run on all operation system.  There is G-Code Tool plugin which is built in the new release (0.92.3).  Here we will use that plugin to create G-code file.

Step by Step Video Tutorial:

Here is a video tutorial which can be followed step by step to create a G-Code file with InkScape so you can engrave it with GRBL CNC rounter kit.

Step by Step Tutorial in Text:

1: How to drawing text  and convert it to G-code file

Engraving text on material is a very common request for the mini CNC machine. Here is a step by step tutorial on how to create a G-code file based on text.

Step 1:  Basic Setting

Open the software, set the Document Properties, and Layers (click to enlarge the images below)

create g-code with inkscape

Set the document size, choose the right display units and size as you wish.

create g-code with inkscape - layer

The object (text or image) should be on a certain layer.  You can add or delete layer, and move object to another layer by cut / paste, or Right Click on the object and choose “Move to layer”!

Step 2:  Type the Text

Click the Text (A) icon on the left tool bar, and type and adjust your text. Notice that the Bottom Left Corner of the layer is you 0,0 coordinate of you machine.

create g-code with inkscape - text

Step 3: Convert to Path

Now we need to convert the object (the text here) to path. So that the plugin can generate G-code by this path. And then we need to Dynamic offset the path.

create g-code with inkscape - object to path

Step 4:  Select Tools.

Now we are ready to generate the G-code for the text. But first we need to choose a tool (a virtual cutter) for the engrave in the software. Here we choose a “Cone” cutter for testing.

Go to the “Extensions” and choose the “Gcodetools” plugin,  and click the “Tools library” options,  where we can choose the tool.

create g-code with inkscape - choose tool

Step 5:  Edit parameters.

After pressed the “Apply” button, there will be a green square generated on the layer,  with many parameters in it.

create g-code with inkscape - parameter

Move the green square to the side of text, and edit the parameter with the text tool. Here is an example parameter:

  • Diameter: 1  (don’t set this too big)
  • Feed: 200  (feed speed is 200mm/min)
  • Penetration Feed 200 (how quickly to engrave or stop)

Step 6:  Set the “Orientation Points”.

Just select “Orientation points”  from the “Gcodetools” menu.

create g-code with inkscape - orientation

The part is a bit hard to understand (for me too :-)). Here we choose the “2 points mode”, and set the Z surface to 0, the Z depth to -1 (the cutter will to 1mm under the surface to start engraving).

Step 7:  Set the “Path of G-code”.

Choose “Path to Gcode” option from the “Gcodetools” menu,  and set the gcode name, file saving path, and other options.

Here we choose to use the default setting, and make sure the object is selected (just click the object / text) before your apply to generate the Gcode.

create g-code with inkscape - generate

And for some reason, you need to click the “Path to Gcode” tab before you clicking “Apply” button. Believe me or you’ll get a error message. Seems it’s a software bug.

Step 8:  You get the G-code file

create g-code with inkscape - done

2: How to convert image to G-code file

Of course you can draw vector images with Inkscape, just like using other vector graphic software.  Here we choose to import an image and convert it to G-code file.  Most of the steps are same with the “TEXT” parts, so here we only provide some different steps.

Step 1:  Import the image into the Inkscape with the default setting.  And click the lock icon so we can adjust the image size by the same proportion. Also we need add a layer and move the image to the layer .

create images g-code with inkscape

Step 2: Since this is a JPEG file,  we need to convert it to vector graphic first.

Remember you don’t need to do this if you draw the image in the Inkscape.
Remember you don’t need to do this if you import a DXF file.

create images g-code with inkscape-trace bitmap

How to Create G-Code File with InkScape

Now you have 2 images on the layer, one is a bitmap, and another one is the original JPEG file.

The bitmap is just on the jpeg file, so just move the bitmap, and delete the jpeg file, and move the bitmap back.

And then we need to convert the “Object to Path”, and “Dynamic Offset” the path, and setting the “Gcodetools” options just like the steps above, and you will get the G-code file.

3: How About Multiple Objects?

As an example, we typed a text under the image. All we need to do is select the two object and group them together.

How to Create G-Code File with InkScape

Make sure to do the “Trace Bitmap” if your image to convert it to vector format before Group them.

And then run all the same steps above to generate the G-code file.

So there it is! Now you are ready to start engraving!

Buy a Mini CNC Engraving Router Kit and start creating now!

Leave a comment