CNC file types: SVG, DXF, EPS, PNG, STL and G-code compared
SVG or DXF for flat work, STL for 3D. Those three hold geometry a CAM program can toolpath. AI, EPS and PDF are containers that have to be exported to SVG or DXF first, and a JPG or PNG holds pixels with no geometry at all, so it has to be traced before anything can be cut.
The three stages, and the files that belong to each
Every format on one page, and which to use for hobby CNC
Files arrive in a dozen formats and only a few of them are what a CAM program actually wants. This is the whole list, with the honest answer for a hobby router.
| Format | What it holds | Best for | Watch out for | For hobby CNC |
|---|---|---|---|---|
| SVG | Vectors: curves and lines with a size | Signs, lettering, logos, any flat artwork. The format most design files are sold in. | Text left as text, strokes, effects and clipping masks do not translate. Units vary between programs, so measure after import. | The everyday format for 2D work |
| DXF | Vectors, drawn in CAD | Dimensioned parts, joinery, anything that must fit | May arrive without units, and old exporters turn curves into thousands of tiny lines | Best for parts that must be to size |
| AI | Illustrator's native file: vectors plus everything Illustrator adds | Editing in Illustrator | Not a cutting format. Export to SVG or DXF after the pre-export pass below. | Source file, not a cut file |
| EPS | An older PostScript vector container | Print shops and clip-art libraries | Same problems as AI, plus flattened text and stray raster blocks. Open it in a vector program and export SVG. | Convert before use |
| Anything: vectors, text, images, all together | Sending a proof to a customer | May be vector inside or may be a picture of vectors. Import and check whether you get editable paths. | Unreliable as a source | |
| PNG, JPG, BMP | Pixels, no geometry | Reference images, and tracing a clean high contrast logo into vectors | Cannot be cut directly. Photographs trace into a mess. JPG adds artefacts around edges that the trace picks up. | Trace it, then fix the vectors |
| Greyscale PNG or TIFF | Brightness read as height | Lithophanes and some relief work, where white is high and black is low | 8 bit greyscale has only 256 height steps, which shows as terraces on gentle slopes. 16 bit is far better. | Special cases only |
| STL | A 3D surface made of triangles | Relief carving, 3D models | No units in the file, so scale is a guess until you set it. Low resolution exports show facets in the carve. | The standard for 3D carving |
| OBJ | A 3D mesh, sometimes with colour and texture | Models from 3D modelling tools | Colour and texture are ignored by CAM; only the mesh matters | Fine, STL is more common |
| CRV, C2D, F3D | A whole CAM project: vectors, toolpaths, tools | Your own work in progress; sharing with someone on the same software | Tied to one program and often one version | Keep, do not sell as the only file |
| NC, GCODE, TAP, NGC | G-code: the machine's movement list | Running the job | Written for one machine, one bit and one setup. Someone else's G-code is not safe to run on yours. | Never buy or share as a design |
If you only remember one line: SVG or DXF for flat work, STL for 3D, and everything else gets converted into one of those first. A seller offering only AI, EPS, PDF or PNG for a cutting design is offering you a conversion job.
A laser file and a CNC file are not the same file
Most file libraries, Kinetic Carving's included, sell designs for both machines, and the same SVG can behave completely differently on each. The difference is what the software reads.
| What laser software does with it | What CNC CAM does with it | |
|---|---|---|
| A stroke (a line with a width) | Treats it as a line to cut or score. Glowforge and xTool both read strokes this way by default. | Ignores the width entirely. A stroke is a zero width path, so the only thing you can do with it is run a bit along it. |
| A fill (a solid shape) | Treats it as an area to engrave, rastering back and forth inside it | Means nothing until you assign a toolpath. A closed shape can be pocketed, V-carved or profiled; the fill colour itself is never read. |
| A PNG or JPG | Engraves it directly, pixel by pixel. This is why laser software is happy with images and why many laser sellers ship PNG. | Cannot use it at all until it is traced into vectors or read as a greyscale heightmap |
| An open path | Cuts or scores along it without complaint | Cannot be pocketed or V-carved. CAM reports open vectors and refuses, or the toolpath goes wrong. See vector troubleshooting. |
| Line art drawn as strokes (a "lined" SVG) | A scoring or cutting design. Exactly what the laser wants. | A single-line engraving path at best. It cannot become a pocket or a V-carve, because there is no enclosed area to carve. |
Spec Glowforge documents strokes as cuts and fills as engraves, with images engrave only. xTool Creative Space imports an SVG as a score by default and lets you switch it to cut or engrave. LaserGRBL loads an SVG as is with no fill option, and does its real work on raster images. LightBurn sets line or fill per layer on any vector. Read September 2026; the laser side is covered in depth on KERF's software and files page.
Vector files: SVG and DXF
A vector file stores shapes as mathematical curves and lines: a circle is a centre and a radius, not a collection of dots. That is exactly what a toolpath needs, because the machine follows a path, so vector files are the native input for all flat CNC work.
| SVG | DXF | |
|---|---|---|
| Comes from | Illustrator, Inkscape, Affinity, most web graphics | AutoCAD, Fusion, most engineering CAD |
| Scale | Has a size, but unit interpretation varies between programs. Always check dimensions after import. | Carries units when the exporter writes them, and CAM often has to ask. Measure anyway. |
| Strength | Artwork, lettering, logos, decorative shapes | Dimensioned parts, joinery, anything that must fit something else |
| Weakness | Can carry effects, strokes and text that do not translate. Convert text to outlines before exporting. | Older versions can export shapes as thousands of tiny line segments instead of arcs |
Why an Illustrator file does not automatically cut
This is the single most common reason a file throws errors on import, and it is worth understanding rather than working around. Most file problems do not come from your machine. They come from the file.
A drawing program and a CAM program are solving two different problems. Illustrator, Affinity and Inkscape exist to make something look right: what matters is the picture on the screen. A CAM program exists to make something cut right: what matters is a continuous path a spinning tool can follow, with a known inside and outside. A file can be flawless at the first job and unusable at the second.
Files drawn in a CAM package are built for cutting from the start: closed vectors, clean nodes, and a clear start and stop point on every shape. Files drawn in an illustration program are built to be looked at. That is not a flaw in the tool, it is what it is for, and it is why an Illustrator file usually needs a pass of preparation before it becomes a CNC file.
What actually arrives broken, and why
| What you see | What is really going on | The fix in Illustrator |
|---|---|---|
| Open paths | The two ends of a shape sit on top of each other so it looks closed, but they were never joined. CAM cannot pocket or offset inside a shape it cannot close, because there is no inside. | Select the path and Join (Ctrl+J). Turn on Smart Guides so you can see anchor points that are not actually connected. |
| Strokes instead of real outlines | A stroke is a width painted onto a line that has no width of its own. Export it and you get the line, not the two edges you were looking at. A "1/4 inch thick" letter drawn as a stroke arrives as a single hairline down the middle. | Object > Path > Outline Stroke, which turns the painted width into a real closed shape. |
| Stacked and duplicate lines | Two identical paths sitting on each other look like one line. CAM sees two, and either cuts the same path twice or refuses to work out which one bounds the pocket. | Most CAM packages have a delete duplicates command on import. Run it, and check the vector count before and after. |
| Live text | Text is still a font reference, not geometry. It depends on that font being installed wherever the file is opened, and it substitutes silently if it is not. | Type > Create Outlines, on a copy of the file so the text stays editable somewhere. |
| Effects and appearances | Drop shadows, offsets, brushes, warps and blends live in the appearance, not in the geometry. They export as nothing at all, or as thousands of tiny segments. | Object > Expand Appearance, then look at what you actually got before exporting. |
| Holes that fill in | The counter of an O, or a window in a panel, has to be a compound path so the software knows it is a hole rather than a separate island to cut around. | Object > Compound Path > Make. |
| Clipping masks | A mask hides geometry on screen. The geometry is still in the file, and it exports. | Release the mask and delete what you were hiding, rather than relying on it. |
| The wrong size | Artboards are commonly in points or pixels, and an SVG's units are interpreted differently by different programs. | Set the document to real units before exporting, then measure a known dimension after importing anyway. |
A pre-export pass that prevents most of it
- Expand appearance, then outline every stroke.
- Convert all text to outlines.
- Release clipping masks and delete the hidden geometry.
- Make holes into compound paths.
- Join open paths, and check for stray single anchor points.
- Set the document units to inches or millimetres and size the art to its real dimensions.
- Export as SVG, then import it and measure one known dimension before you build a single toolpath.
Kinetic Carving covers this in under a minute on TikTok.
Raster files: JPG, PNG, BMP
These are grids of pixels. There are no shapes in them, only colours in positions. A CNC cannot cut a pixel. To use one you have to convert it, and there are two completely different conversions:
- Tracing to vectors. Software looks for edges between light and dark and draws outlines around them. This gives you something cuttable, and the quality depends entirely on the source image. A clean high contrast logo traces beautifully. A photograph traces into a mess with thousands of nodes. See vector troubleshooting.
- Interpreting brightness as height. Some software reads a greyscale image as a heightmap, where white is high and black is low, and produces a 3D surface. It works for some subjects and produces soap-carving mush for most photographs.
3D files: STL and OBJ
An STL is a surface made of triangles. It has no colour, no units recorded in the file itself, and no smooth curves: everything is approximated by flat triangles, so resolution matters. A model exported at low resolution shows visible facets in the carve, and no amount of fine stepover will remove them.
For CNC relief work the model does not need to be a closed solid, because you are only carving the surface that faces up. What matters is that it sits flat, is scaled correctly, and is oriented so the detail faces the tool. See 3D carving.
G-code
The end of the chain. A text file of movement instructions, written specifically for your controller by the post processor. It is machine and setup specific: it contains your feed rates, your depths, your tool changes and your coordinate system. It is not portable between machines in the way a design file is.
What to ask a seller before buying a file
- If vectors: are they closed, clean, and at a real size? Open paths will not pocket, and a file drawn at the wrong scale is a fix you inherit.
- If it is sold as a 3D file, is it genuinely a model, or a greyscale image? The two are not the same thing and both get listed as "3D". A real STL is geometry you can measure, tilt and edit. A greyscale is a picture of depth, converted to a surface at carve time: it works, but the detail ceiling is set by the image, and you cannot edit it as a shape.
- If it is a 3D model, was it made with AI? This is the one place the question really matters. In our experience so far, AI generated models come out noticeably worse than hand modelled ones: detail goes soft, surfaces come out lumpy rather than crisp, and features that look convincing in a preview render carve as blobs. A model somebody actually sculpted holds its edges and still reads at depth. No toolpath setting rescues a mushy model, so it is worth knowing before you buy rather than after the first roughing pass.
- Is it a design file or a finished G-code program? Finished G-code made for someone else's machine and bits is close to useless on yours.