G-code is a language using which a computer controls the operations of a CNC machine.
CAM software converts the CAD file into G-codes that control the speeds, feeds, and coordinates of the CNC machine.
Although G-codes are automatically generated by a computer software program, editing these G-codes is often required to tweak a CNC machining process.
There are many G-code editors available on the market and it can be confusing to choose the one that suits your requirement.
|NC Corrector V4.0||Free|
|G-code Q'n'dirty Toolpath Simulator||Free|
|Visual Studio Code (VS Code)||Free|
In this article, I have shortlisted the best G-code editors available and differentiated them based on their features, along with key insights on each software.
Best Free G-code Editors
NC Viewer- Best Overall G-code Editor
|Operating system||OS independent (browser-based)|
Quick summary of NC Viewer
NC Viewer is an online G-code editor built for 3-axis and 5-axis milling machines.
It is a web-based G-code editor that can be accessed through a web browser, and once cached in the system memory, it can be loaded in offline mode too.
The CAD environment allows you to visualize your code in real-time by plotting the toolpath. You can zoom, pan, and orbit your plot.
Being a browser-based G-code editor, NC Viewer can be used on Android, iOS, and Windows devices.
You can see the real-time position of the mill in the plot as you move through every line of your code.
This feature, along with syntax highlighting, will help you pinpoint the exact area of error and fix it.
One thing to note is that NC Viewer is not best suitable for 3D printing, as it may not respond well to some 3D-printing commands.
However, it is ideal for editing the G-codes of CNC milling operations.
NC Corrector V4.0
|CAM||Yes (from DXF and APT formats)|
Quick summary of NC Corrector V4.0
NC Corrector V4.0 is free offline software that can render basic G-codes, drilling cycles, and subprograms.
You can import DXF and APT file types and convert them to G-code.
NC Corrector provides various details about your code, such as machining time, path length, maximum/minimum point of trajectory, number of segments, arcs, etc.
It shows the toolpath as a 3D model above the code, which can help you visualize your code and make corrections.
G-code Q'n'dirty Toolpath Simulator
|Operating system||OS independent (browser-based)|
Quick summary on G-code Q'n'dirty Toolpath Simulator
G-code Q'n'dirty Toolpath Simulator is a browser-based G-code editor that requires an active internet connection for editing the G-codes and simulating the toolpath.
It provides a CAD environment to write your code and visualize the toolpath in 2D and 3D perspectives.
The interface is not fancy but it is straightforward and easy to use. It loads quickly and takes less processing power to operate.
It also shows the estimated time to complete the job.
This software is ideal for CNC milling operations but does not have the build-plate size approximation feature, which is generally used for 3D printers to ensure the print fits the available workarea.
Furthermore, G-code Q'n'dirty can also be used to run quick simulations, eliminating the need for high-end simulation software.
Quick summary of Notepad++
Notepad++ is a free offline code editor for Windows that can be easily downloaded from its official website.
It is an upgrade to their previous version that ensures higher execution speed and smaller file size.
You can perform basic editor operations like search, replace, and find in Notepad++.
Although it does not automatically highlight your G-code, you can download the G-code extension to add this feature.
After downloading the G-code extension, import it into Notepad++.
Next time you want to use Notepad++ to edit your G-code, navigate to the 'language' section in the toolbar and select the G-code extension.
Visual Studio Code (VS Code)
|CAM||Yes (for basic operations)|
|Operating system||Windows, Mac, Linux|
Quick summary of Visual Studio Code
Visual Studio Code, developed by Microsoft, is a free offline code editor which can be used to edit G-codes.
It requires a G-code extension to recognize and highlight the G-code automatically.
VS Code provides several add-ons to choose from, which require an active internet connection to install.
An HSM extension, that you can download from VS Code, can also generate editable sample code for basic operations.
You can even double click on a line of your G-code and VS Code will automatically identify the post-processor that generated it.
It must be noted that VS Code and Notepad++ are recommended for applications where you only want to write and edit your G-code.
However, they are not specifically designed for CNC machining and don't offer visualization of the toolpath.
Best Paid G-Code Editors
|CAM||Yes (for simple operations)|
Quick summary of G-Wizard editor
G-Wizard Editor is an offline G-code editor, commonly used for commercial purposes in writing or modifying G-code.
It is a paid software with a free trial for 30 days and costs around $99 for a year, $199 for three years, and $299 for a lifetime.
G-wizard Editor has basic features like error debugging and back plotting along with a powerful simulator to visualize complex G-codes.
One of the useful features of G-Wizard Editor is conversational CNC programming.
It can generate G-code for simple operations like hole, face mill, slot, pocket, boss, tapping, and engraving without the need for a separate CAD/CAM software.
G-Wizard editor also checks for errors in your code, helping with debugging and troubleshooting your program.
G-Wizard Editor has training videos and articles on their website which will help you to get started with the software.
|CAM||Yes (from DXF drawings)|
Quick summary on NCPlot
NCPlot is a paid G-code editor that does not require an active internet connection for operation.
Its license costs around $300, and if you are a registered NCPlot user, you can get a discounted price of around $150 for additional licenses for up to one year.
It is developed for 4-axis mill and 2-axis lathe and is used extensively in industries for its wide range of functionalities like mirror, rotate, shift, scale, address adjustments, address calculator, and making multiple copies of part features.
NCPlot can convert plain text directly into G-code. It can also estimate the time required to complete a part and the machining time of a tool for a particular function.
It can import DXF drawings to generate G-code for mill and lathe. Backplot can be saved as a DXF file and can be fed back into a CAD/CAM software.
Quick summary on CIMCO Edit
CIMCO Edit is a premium G-code editing software meant for professionals.
It is one of the most costly G-code editors, with subscriptions starting at around $605.
Apart from the basic features like mirror, rotate, shift, and scale it also provides advanced features like side-by-side file compare, 2D CAD/CAM, code assist, error checking, toolpath statistics, collision prediction, and powerful add-ons for simulations.
CIMCO Edit can interface with multiple machines simultaneously and does not require an active internet connection to operate.
The graphical backplotter can handle 2-axis lathe and 3-axis mill, and provides an easy-to-understand stock animation with dynamic zoom, panning, rotating, and measuring functions.
The NC code assistant allows you to edit your G-code easily. Just feed in the required values and the NC code assistant will make those changes throughout the code.
CIMCO Edit has one of the most extensive documentation including several training videos on their website to help you learn and get the most out of the software.
Quick summary of TKCNC
TKCNC is a paid, downloadable software for writing and debugging G-code with a single license costing around 99 EUR ($107).
Three licenses can be bought at around 79 EUR ($85.5) each, and at 349 EUR ($378) you can get an unlimited number of licenses for a single location.
TKCNC is an offline G-code editor that provides all the basic features such as cut, copy, paste, syntax highlighting, and find/replace functions.
It allows for various operations with CNC code registers, such as renumbering, translation, mirroring, 2D and 3D rotation, sorting, and other mathematical operations.
TKCNC provides the ability to import DXF files from AutoCAD and convert them to G-code.
Although TKCNC's user interface is not very appealing, its wide range of features makes it a powerful G-code editor.
Frequently Asked Questions (FAQ)
Is G-code used in 3D printers?
Yes, G-code is used in 3D printers to perform operations like setting speed, coordinates, bed & nozzle temperature, fan speed, etc.
What prerequisites are needed to learn G-code programming?
The prerequisites needed to learn G-code programming are basic mathematics and knowledge of how CNC machines work. It is fairly easy to develop a good understanding of G-code programming as the language is very logical, but advanced CNC programming can take years to master. However, the ability to use a computer to convert your SVG file to G-code has made it easy to program complex designs.
What is M-code?
M-code is a part of CNC programming that controls the miscellaneous operations like spindle ON/OFF, spindle rotation direction, coolant ON/OFF, pallet changes, etc. Generally, a typical CNC program consists of a combination of G-codes and M-codes. M-code is customizable and can vary from machine to machine, whereas G-codes are universal.