Important – use at your own risk. Figures, code and guides on this site are guides only, not professional or technical advice. Always check your machine’s manual and the manufacturer’s limits before use. You are responsible for your own safety and for checking every result. See the disclaimer and terms.
CNC & G-code
Example programs, a G-code viewer and plain-English codes. Search from the header, or pick a tool below.
- G-code viewerDraw a program’s toolpath, check extents and estimate run time.
- G-code referenceCommon G and M codes in plain English, with control differences marked.
- Bolt hole G-codeG81 or G83 drilling program for holes on a PCD.
- Helical bore G-codeHelical interpolation program to bore a hole with an end mill.
- Thread milling G-codeInternal or external thread milling program, right or left hand.
- Face milling G-codeZig-zag or one-way facing passes with stepover, depth passes and climb or conventional.
- Turning G-codeRough and finish a diameter with chamfer and face: G71/G70 or plain G1 passes.
- Convert arc centre offsets & radius (I/J/K ↔ R)Convert arc centre offsets to a signed radius and back, with a radius check.
- Machining time estimateEstimate machining time from cut length, feed, rapids and tool changes.
- G76 threading cycleThread height, final X and a two-block G76 example for a CNC lathe.
- Tool nose compensationHow far to shift a chamfer or taper for the nose radius.