← Back to results

HTTP/1

.1 200 OK date: Fri, 03 Jul 2026 06:26:56 GMT server: mw-web.codfw.main-54f6d45877-p5shx x-content-type-options: nosniff content-language: en accept-ch: reporting-endpoints: csp-report-to-endpoint='/w/api.php?action=cspreport&format=json'; content-security-policy: script-src 'unsafe-eval' blob: 'self' meta.wikimedia.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikifunctions.org *.wikivoyage.org *.mediawiki.org mediawiki.org wikimedia.org *.wmflabs.org *.wmcloud.org *.toolforge.org wss://*.toolforge.org *.jsdelivr.net unpkg.com cdnjs.cloudflare.com raw.githubusercontent.com *.github.com code.jquery.com cdn.mathjax.org use.typekit.net fonts.cdnfonts.com use.fontawesome.com i.ytimg.com rsms.me doi.org localhost https://localhost:* http://localhost:* wss://localhost:* ws://localhost:* *.google.com *.gstatic.com *.googleapis.com *.translate.yandex.net yastatic.net ya.ru radically.github.io cdn.sammdot.ca cdn.fontshare.com viaf.org publicai-proxy.alaexis.workers.dev iiif.archive.org api.flickr.com live.staticflickr.com api.anthropic.com api.openai.com api.publicai.co catalogo.pusc.it parsifal.urbe.it opac.sbn.it overpass-api.de api.openrouteservice.org archive.org *.openstreetmap.org *.waymarkedtrails.org *.thunderforest.com registry.ipe.wiki analytics.ipe.wiki qlever.dev app.goacoustic.com wikipedia-archive.ourworldindata.org api.inaturalist.org inaturalist-open-data.s3.amazonaws.com validator.w3.org db.onlinewebfonts.com fontlibrary.org 'unsafe-inline' auth.wikimedia.org; default-src 'self' data: blob: upload.wikimedia.org https://commons.wikimedia.org meta.wikimedia.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikifunctions.org *.wikivoyage.org *.mediawiki.org mediawiki.org wikimedia.org *.wmflabs.org *.wmcloud.org *.toolforge.org wss://*.toolforge.org *.jsdelivr.net unpkg.com cdnjs.cloudflare.com raw.githubusercontent.com *.github.com code.jquery.com cdn.mathjax.org use.typekit.net fonts.cdnfonts.com use.fontawesome.com i.ytimg.com rsms.me doi.org localhost https://localhost:* http://localhost:* wss://localhost:* ws://localhost:* *.google.com *.gstatic.com *.googleapis.com *.translate.yandex.net yastatic.net ya.ru radically.github.io cdn.sammdot.ca cdn.fontshare.com viaf.org publicai-proxy.alaexis.workers.dev iiif.archive.org api.flickr.com live.staticflickr.com api.anthropic.com api.openai.com api.publicai.co catalogo.pusc.it parsifal.urbe.it opac.sbn.it overpass-api.de api.openrouteservice.org archive.org *.openstreetmap.org *.waymarkedtrails.org *.thunderforest.com registry.ipe.wiki analytics.ipe.wiki qlever.dev app.goacoustic.com wikipedia-archive.ourworldindata.org api.inaturalist.org inaturalist-open-data.s3.amazonaws.com validator.w3.org db.onlinewebfonts.com fontlibrary.org en.wikibooks.org en.wikinews.org en.wikiquote.org en.wikisource.org en.wikiversity.org en.wikivoyage.org en.wiktionary.org www.mediawiki.org commons.wikimedia.org foundation.wikimedia.org incubator.wikimedia.org species.wikimedia.org wikimania.wikimedia.org www.wikidata.org www.wikifunctions.org auth.wikimedia.org; style-src 'self' data: blob: upload.wikimedia.org https://commons.wikimedia.org meta.wikimedia.org *.wikimedia.org *.wikipedia.org *.wikinews.org *.wiktionary.org *.wikibooks.org *.wikiversity.org *.wikisource.org wikisource.org *.wikiquote.org *.wikidata.org *.wikifunctions.org *.wikivoyage.org *.mediawiki.org mediawiki.org wikimedia.org *.wmflabs.org *.wmcloud.org *.toolforge.org wss://*.toolforge.org *.jsdelivr.net unpkg.com cdnjs.cloudflare.com raw.githubusercontent.com *.github.com code.jquery.com cdn.mathjax.org use.typekit.net fonts.cdnfonts.com use.fontawesome.com i.ytimg.com rsms.me doi.org localhost https://localhost:* http://localhost:* wss://localhost:* ws://localhost:* *.google.com *.gstatic.com *.googleapis.com *.translate.yandex.net yastatic.net ya.ru radically.github.io cdn.sammdot.ca cdn.fontshare.com viaf.org publicai-proxy.alaexis.workers.dev iiif.archive.org api.flickr.com live.staticflickr.com api.anthropic.com api.openai.com api.publicai.co catalogo.pusc.it parsifal.urbe.it opac.sbn.it overpass-api.de api.openrouteservice.org archive.org *.openstreetmap.org *.waymarkedtrails.org *.thunderforest.com registry.ipe.wiki analytics.ipe.wiki qlever.dev app.goacoustic.com wikipedia-archive.ourworldindata.org api.inaturalist.org inaturalist-open-data.s3.amazonaws.com validator.w3.org db.onlinewebfonts.com fontlibrary.org 'unsafe-inline'; object-src 'none'; report-uri /w/api.php?action=cspreport&format=json; report-to csp-report-to-endpoint last-modified: Fri, 03 Jul 2026 00:31:06 GMT content-type: text/html; charset=UTF-8 age: 2 accept-ranges: bytes x-cache: cp2047 miss, cp2047 miss x-cache-status: miss server-timing: cache;desc="miss", host;desc="cp2047" strict-transport-security: max-age=106384710; includeSubDomains; preload report-to: { "group": "wm_nel", "max_age": 604800, "endpoints": [{ "url": "https://intake-logging.wikimedia.org/v1/events?stream=w3c.reportingapi.network_error&schema_uri=/w3c/reportingapi/network_error/1.0.0" }] } nel: { "report_to": "wm_nel", "max_age": 604800, "failure_fraction": 0.05, "success_fraction": 0.0} set-cookie: WMF-Last-Access=03-Jul-2026;Path=/;HttpOnly;secure;Expires=Tue, 04 Aug 2026 00:00:00 GMT set-cookie: WMF-Last-Access-Global=03-Jul-2026;Path=/;Domain=.wikipedia.org;HttpOnly;secure;Expires=Tue, 04 Aug 2026 00:00:00 GMT set-cookie: WMF-DP=c24;Path=/;HttpOnly;secure;Expires=Fri, 03 Jul 2026 00:00:00 GMT x-client-ip: 75.28.18.94 cache-control: private, s-maxage=0, max-age=0, must-revalidate, no-transform vary: Accept-Encoding,X-Subdomain,Cookie,Authorization,User-Agent set-cookie: GeoIP=US:TX:McKinney:33.20:-96.62:v4; Path=/; secure; Domain=.wikipedia.org set-cookie: NetworkProbeLimit=0.001;Path=/;Secure;SameSite=None;Max-Age=3600 set-cookie: WMF-Uniq=Tjq4XrNNuT4p0thS57NM_gOSAAAAAFvdHraRlQe9D3r6xYhN-CXNtEXQMQq_7r9M;Domain=.wikipedia.org;Path=/;HttpOnly;secure;SameSite=None;Expires=Sat, 03 Jul 2027 00:00:00 GMT transfer-encoding: chunked x-request-id: 39f55307-8365-4e95-985b-d648ce3aaf95 x-analytics: 8000 G-code - Wikipedia Jump to content Main menu Main menu move to sidebar hide Navigation Main page Contents Current events Random article About Wikipedia Contact us Contribute Help Learn to edit Community portal Recent changes Upload file Special pages Search Search Appearance Donate Create account Log in Personal tools Donate Create account Log in Contents move to sidebar hide (Top) 1 History 2 Syntax 3 Extensions and variations 4 See also 5 References 6 Bibliography 7 External links Toggle the table of contents G-code 26 languages العربية Беларуская Català Čeština Dansk Deutsch Ελληνικά Español Eesti فارسی Français हिन्दी Hrvatski Italiano Қазақша 한국어 Nederlands Polski Português Română Русский Српски / srpski Türkçe Українська 粵語 中文 Edit links Article Talk English Read Edit View history Tools Tools move to sidebar hide Actions Read Edit View history General What links here Related changes Upload file Permanent link Page information Cite this page Get shortened URL Switch to legacy parser Print/export Download as PDF Printable version In other projects Wikidata item Appearance move to sidebar hide From Wikipedia, the free encyclopedia Programming language used in CNC and 3D printing For other uses, see G-code (disambiguation) and G programming language (disambiguation) . "RS-274" redirects here. For the photoplotter format, see Gerber format . This article includes a list of general references , but it lacks sufficient corresponding inline citations . Please help to improve this article by introducing more precise citations. ( January 2025 ) ( Learn how and when to remove this message ) This article may require restoring an older revision. Relevant discussion may be found on the talk page . ( May 13, 2025 ) G-code Paradigm Procedural , imperative Designed   by Massachusetts Institute of Technology Developer Electronic Industries Association (RS-274), International Organization for Standardization (ISO-6983) First   appeared 1963   ( 1963 ) (RS-274) Filename extensions .gcode, .mpt, .mpf, .nc and several others Major implementations Numerous; mainly Siemens Sinumerik, FANUC , Haas , Heidenhain , Mazak , Okuma G-code (abbreviation for geometric code ; also called [ 1 ] RS-274 , [ 2 ] standardized today in ISO 6983-1 [ 3 ] ) is the most widely used computer numerical control (CNC) and 3D printing programming language . It is used mainly in computer-aided manufacturing to control automated machine tools , as well as for 3D-printer slicer applications . G-code has many variants. G-code instructions are provided to a machine controller (industrial computer) that tells the motors where to move, how fast to move, and what path to follow. The two most common situations are that, within a machine tool such as a lathe or mill , a cutting tool is moved according to these instructions through a toolpath cutting away material to leave only the finished workpiece and/or an unfinished workpiece is precisely positioned in any of up to nine axes [ 4 ] around the three dimensions relative to a toolpath and, either or both can move relative to each other. The same concept also extends to noncutting tools such as forming or burnishing tools, photoplotting , additive methods such as 3D printing, and measuring instruments. History [ edit ] The first implementation of a numerical control programming language was developed at the MIT Servomechanisms Laboratory in the 1950s. In the decades that followed, many implementations were developed by numerous organizations, both commercial and noncommercial. Elements of G-code had often been used in these implementations. [ 5 ] [ 6 ] [ 7 ] The first standardized version of G-code used in the United States, RS-274 , was published in 1963 by the Electronic Industries Alliance (EIA; then known as Electronic Industries Association). [ 8 ] In 1974, EIA approved RS-274-C , which merged RS-273 (variable block for positioning and straight cut) and RS-274-B (variable block for contouring and contouring/positioning). A final revision of RS-274 was approved in 1979, as RS-274-D . [ 9 ] [ 10 ] In other countries, the standard ISO 6983 (finalized in 1982) is often used, but many European countries use other standards. [ 11 ] For example, DIN 66025 is used in Germany, and PN-73M-55256 and PN-93/M-55251 were formerly used in Poland. From the 1970s to 1990s, many CNC machine tool builders attempted to overcome compatibility difficulties by standardizing on machine tool controllers built by Fanuc . Siemens was another market dominator in CNC controls, especially in Europe. In the 2010s, controller differences and incompatibility were mitigated with the widespread adoption of CAD / CAM applications that could output the appropriate G-code to operate a specific machine through a software tool called a post-processor (sometimes shortened to "post"). Syntax [ edit ] G-code began as a limited language that lacked constructs such as loops, conditional operators, and programmer-declared variables with natural -word-including names (or the expressions in which to use them). It was unable to encode logic but was just a way to "connect the dots" where the programmer figured out many of the dots' locations longhand. The latest implementations of G-code include macro language capabilities somewhat closer to a high-level programming language . Additionally, all primary manufacturers (e.g., Fanuc , Siemens Digital Industries Software , Heidenhain ) provide access to programmable logic controller (PLC) data, such as axis positioning data and tool data, [ 12 ] via variables used by NC programs. These constructs make it easier to develop automation applications. Extensions and variations [ edit ] Extensions and variations have been added independently by control manufacturers and machine tool manufacturers, and operators of a specific controller must be aware of the differences between each manufacturer's product. One standardized version of G-code, known as BCL (Binary Cutter Language), is used only on very few machines. Developed at MIT, BCL was developed to control CNC machines in terms of straight lines and arcs. [ 13 ] Some CNC machines use "conversational" programming, which is a wizard -like programming mode that either hides G-code or completely bypasses the use of G-code. Some popular examples are Okuma's Advanced One Touch (AOT), Southwestern Industries' ProtoTRAK, Mazak's Mazatrol, Hurco's Ultimax and Winmax, Haas' Intuitive Programming System (IPS), and Mori Seiki's CAPS conversational software. See also [ edit ] Canned cycle Direct Numerical Control LinuxCNC List of computer-aided manufacturing software 3D printing Slicer (3D printing) References [ edit ] ↑ Barkmeyer, Edward J.; Hopp, Theodore H.; Michael J., Pratt; Gaylen R., Rinaudot, eds. (1995). Background Study: Requisite Elements, Rationale, and Technology Overview for the Systems Integration for Manufacturing Applications (SIMA) Program (PDF) (Technical report) (NIST Interagency/Internal Report (NISTIR) 5662   ed.). Gaithersburg, MD, USA: NIST Technical Series Publications. p.   45. ↑ EIA Standard RS-274-D Interchangeable Variable Block Data Format for Positioning, Contouring, and Contouring/Positioning Numerically Controlled Machines . 2001 Eye Street, NW, Washington, D.C. 20006: Electronic Industries Association. February 1979. {{ cite book }} : CS1 maint: location ( link ) ↑ Technical Committee ISO/TC 184/SC 1, ed. (December 2009). ISO 6983-1:2009 Automation systems and integration — Numerical control of machines — Program format and definitions of address words; Part 1: Data format for positioning, line motion and contouring control systems (Technical report). Geneva, Switzerland: International Standards Organization. {{ cite tech report }} : CS1 maint: numeric names: editors list ( link ) ↑ Karlo Apro (2008). Secrets of 5-Axis Machining . Industrial Press Inc. ISBN   0-8311-3375-9 . ↑ Xu, Xun (2009). Integrating Advanced Computer-aided Design, Manufacturing, and Numerical Control: Principles and Implementations . Information Science Reference. p.   166. ISBN   978-1-59904-716-4 – via Google Books. ↑ Altintas, Yusuf (2012). Manufacturing Automation: Metal Cutting Mechanics, Machine Tool Vibrations, and CNC Design (2nd   ed.). Cambridge University Press. ISBN   978-1-107-00148-0 – via Google Books. ↑ Harik, Ramy; Thorsten Wuest (2019). Introduction to Advanced Manufacturing . SAE International. p.   116. ISBN   978-0-7680-9096-3 – via Google Books. ↑ Evans, John M. Jr. (1976). National Bureau of Standards Information Report (NBSIR) 76-1094 (R): Standards for Computer Aided Manufacturing (PDF) . National Bureau of Standards. p.   43. ↑ Schenck, John P. (January 1, 1998). "Understanding common CNC protocols" . Wood & Wood Products . 103 (1). Vance Publishing: 43 – via Gale. ↑ EIA Standard RS-274-D Interchangeable Variable Block Data Format for Positioning, Contouring, and Contouring/Positioning Numerically Controlled Machines , Washington D.C.: Electronic Industries Association, February 1979 ↑ Stark, J.; V.   K. Nguyen (2009). "STEP-compliant CNC Systems, Present and Future Directions". In Xu, Xun; Andrew Yeh Ching Nee (eds.). Advanced Design and Manufacturing Based on STEP . Springer London. p.   216. ISBN   978-1-84882-739-4 – via Google Books. ↑ "Fanuc macro system variables" . Machinetoolhelp. 2006. Archived from the original on 2014-05-03. ↑ Libicki, Martin (1995). Information Technology Standards: Quest for the Common Byte . Burlington: Elsevier Science. p.   321. ISBN   978-1-4832-9248-9 . OCLC   895436474 . Bibliography [ edit ] Oberg, Erik; Jones, Franklin D.; Horton, Holbrook L.; Ryffel, Henry H. (1996), Green, Robert E.; McCauley, Christopher J. (eds.), Machinery's Handbook (25th   ed.), New York: Industrial Press , ISBN   978-0-8311-2575-2 , OCLC   473691581 . Smid, Peter (2008), CNC Programming Handbook (3rd   ed.), New York: Industrial Press, ISBN   9780831133474 , LCCN   2007045901 . Smid, Peter (2010), CNC Control Setup for Milling and Turning , New York: Industrial Press, ISBN   978-0831133504 , LCCN   2010007023 . Smid, Peter (2004), Fanuc CNC Custom Macros , Industrial Press, ISBN   978-0-8311-3157-9 . External links [ edit ] CNC G-Code and M-Code Programming Kramer, T. R.; Proctor, F. M.; Messina, E. R. (1 Aug 2000), "The NIST RS274NGC Interpreter – Version 3" , NIST , NISTIR 6556 http://museum.mit.edu/150/86 Archived 2016-03-19 at the Wayback Machine Has several links (including history of MIT Servo Lab) Complete list of G-code used by most 3D printers at reprap.org Fanuc and Haas G-code Reference Fanuc and Haas G-code Tutorial Haas Milling Manual G Code For Lathe & Milling M Code for Lathe & Milling v t e Metalworking v t e Machining and computing Computer-aided engineering 2.5D CAD CAM G-code Numerical control (NC and CNC) Stewart platform Drilling and threading Die head Drill Drill bit Drill bit shank Drill bit sizes Drilling List of drill and tap sizes Tap and die Tap wrench Threading Grinding and lapping Abrasive Abrasive machining Angle grinder Bench grinder Coated abrasive Cylindrical grinder Diamond plate Flick grinder Grinding Grinding dresser Grinding machine Grinding wheel Jig grinder Lapping Sanding Sharpening stone Spark testing Surface grinder Tool and cutter grinder Machining Boring Broaching Electrical discharge machining Electrochemical machining Electron-beam machining End mill Engraving Facing Hobbing Jig borer Machine tool Machining Metal lathe Milling Milling cutter Pantograph Photochemical machining Planer Reamer Rotary transfer machine Shaper Skiving Turning Ultrasonic machining Machine tools Angle plate Chuck Collet Fixture Indexing head Jig Lathe center Machine taper Magnetic switchable device Mandrel Rotary table Wiggler Terminology Cutting fluid Machining vibrations Speeds and feeds Swarf Tolerance Tool and die making Tramp oil Workpiece Casting Fabrication Forming Jewellery Machining Metallurgy Smithing Tools and terminology Welding Retrieved from " https://en.wikipedia.org/w/index.php?title=G-code&oldid=1360576694 " Categories : Computer-aided engineering Domain-specific programming languages Encodings Metalworking Hidden categories: Articles with short description Short description is different from Wikidata Articles lacking in-text citations from January 2025 All articles lacking in-text citations CS1 maint: location CS1 maint: numeric names: editors list Webarchive template wayback links This page was last edited on 22 June 2026, at 10:34  (UTC) . Page was rendered with Parsoid . Text is available under the Creative Commons Attribution-ShareAlike 4.0 License ; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy . Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. , a non-profit organization. Privacy policy About Wikipedia Disclaimers Contact Wikipedia Legal & safety contacts Code of Conduct Developers Statistics Cookie statement Mobile view Search Search Toggle the table of contents G-code 26 languages Add topic 0