# Kerfwise G-code Inspector > Check G-code: cutting and rapid length, machining time, bounds, tools, warnings, preview. Reads a CNC G-code program (GRBL, LinuxCNC, Fanuc-style, most CAM posts) and measures the rapid and cutting path, the machining time with an optional acceleration and cornering model, the X/Y/Z bounds and Z range, statistics per tool and the feeds and spindle speeds used. It warns about missing units, missing feed rates, arcs whose radius does not match, sideways rapids below Z0 and other common mistakes, and draws a top-view toolpath preview. Part of usefulweb.site (https://usefulweb.site/). Part of [Kerfwise](https://kerfwise.usefulweb.site/) (ownerApp: kerfwise). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://kerfwisegcodeinspector.usefulweb.site/ (interactive tool at https://kerfwisegcodeinspector.usefulweb.site/tool) - JSON API: POST https://kerfwisegcodeinspector.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://kerfwisegcodeinspector.usefulweb.site/api/v1/tool) - OpenAPI: https://kerfwisegcodeinspector.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://kerfwisegcodeinspector.usefulweb.site/mcp - tool `kerfwise_gcode_inspector` ## Inputs - gcode (textarea): G-code - Paste the program, or upload a file below. - file (file): Or: G-code file - rapidRate (number): Rapid rate (G0) - toolChangeSec (number): Time per tool change (M6) - pauseSec (number): Time per program stop (M0/M1) - For example a manual tool change on GRBL. - acceleration (number): Acceleration (0 = ignore) - With a value, every move speeds up and slows down (trapezoid profile) and corners are taken at the GRBL junction-deviation speed. - junctionDeviation (number): Junction deviation - defaultUnits (select): Units when the program sets none - startX (number): Start X - startY (number): Start Y - startZ (number): Start Z ## Method - Each line is read like an RS-274/NGC controller: comments in ( ) and after ; are removed, modal state (motion G0–G3 and canned cycles, plane G17/G18/G19, units G20/G21, distance mode G90/G91, arc centre mode G90.1/G91.1, feed mode G93/G94/G95, retract G98/G99, F, S, T) carries over from line to line. Inch programs are converted to mm. - Arcs: the centre comes from I/J/K (relative to the start unless G90.1) or from R (negative R = more than 180°). The length is the swept angle × radius, combined with the linear axis for helical arcs. If start and end radius differ by more than 0.002 mm (or 0.1 %), a warning is raised, as many controllers stop there. - Canned cycles G81/G82/G83/G73/G85/G89 are expanded into their rapid and feed moves (G83 retracts to R after each peck and rapids back to 0.254 mm above the last depth). - Time without acceleration = feed moves ÷ feed + rapids ÷ rapid rate + dwells (G4 P seconds, Fanuc G4 X seconds) + tool changes + program stops. With an acceleration, every move follows a trapezoid profile with GRBL-style look-ahead: corner speed from the junction deviation, arcs limited to √(a × r), full stops at dwells, tool changes, spindle changes and pauses. - Bounds cover every move (rapids included); cutting bounds cover the feed moves only. Statistics are split per tool loaded with M6 (or with T alone in programs without M6). ## Limits - An estimate, not a machine simulation: controller look-ahead, feed overrides, tool-change routines and macros differ. Always dry-run a program above the material first.