The difference between .gcode and .3mf files
.gcode and .3mf are two different file formats that work at different stages of 3D printing, and they serve completely different purposes. A .3mf file is a design file — it holds the 3D model itself, the way a .jpg holds a photograph. A .gcode file is an instruction file — it tells your 3D printer exactly what to do, line by line, the way a recipe tells you how to bake.
When you design something in a 3D modeling program like Fusion 360 or Tinkercad, you save it as a .3mf file (or sometimes .stl, which is older but similar). That file contains the shape, dimensions, and structure of your object. When you're ready to print, you open that .3mf file in slicing software — a program like Cura or PrusaSlicer — which converts it into a .gcode file. The slicer breaks your model into thousands of thin layers and calculates exactly how fast the printer should move, how hot the nozzle should be, and where every single line of plastic should go.
You never send a .3mf file directly to your printer. Your printer only understands .gcode. If you try to load a .3mf file onto your printer's memory card, nothing will happen.
Key Takeaways
- .3mf files contain the 3D model design itself, while .gcode files contain the step-by-step instructions your printer follows to build that design.
- You create or read a .3mf file, then use slicing software to convert it into a .gcode file before printing.
- .3mf is a newer format that stores more detail than the older .stl format, but both work the same way in the printing process.
- Your 3D printer reads only .gcode files; it cannot read .3mf files directly.
- The same .3mf file can produce different .gcode files depending on your printer model and slicing settings.
How .3mf files work
A .3mf file is a compressed folder that contains the 3D model data plus metadata — information about materials, colors, and sometimes even how different parts should be printed. The format was developed by Microsoft and a consortium of 3D printing companies to be more detailed and reliable than the older .stl format. If you open a .3mf file in a text editor, you'll see XML code describing the geometry of your object.
You can read .3mf files from sites like Thingiverse, Printables, or MyMiniFactory. You can also export them from design software. The file itself is just data — it doesn't contain any printer-specific information. A .3mf file for a small figurine will be the same whether you plan to print it on a budget Ender 3 or a professional Formlabs printer.
How .gcode files work
A .gcode file is a text file full of commands written in a language your printer understands. Each line is an instruction: "move the nozzle to X position 50, Y position 75," or "heat the bed to 60 degrees," or "extrude plastic at 200 millimeters per second." The file can contain thousands or tens of thousands of lines for a single print.
Slicing software reads your .3mf file and your printer settings — nozzle temperature, bed temperature, layer height, infill percentage, print speed — and generates all those .gcode commands. If you change your layer height from 0.2 millimeters to 0.1 millimeters, the slicer will create a completely different .gcode file from the same .3mf, because the printer now needs to move more slowly and make more passes.
You load the .gcode file onto your printer either by copying it to an SD card, uploading it over USB, or sending it over your network if your printer supports that. The printer reads the file line by line and executes each command.
Why you need both formats
The separation between design and instructions is intentional. It means you can share a .3mf file with someone else, and they can slice it however they want for their own printer and settings. You don't have to create a new design from scratch every time you want to print something on a different machine or with different quality settings.
It also means you can keep your original .3mf file and generate multiple .gcode files from it. If your first print didn't work well, you can re-slice the same .3mf with different settings — slower speed, higher temperature, more infill — without touching the design itself.
.3mf versus .stl: what changed
.stl (stereolithography) is the older standard format for 3D printing. It contains only the geometry of the object — the shape and dimensions — with no color, material, or other information. Most 3D printers still support .stl files, and many design programs export to .stl by default.
.3mf was created to fix limitations in .stl. It can store color information, material types, and multiple objects in a single file. It also compresses better, so .3mf files are usually smaller than .stl files of the same model. However, .3mf is newer, and not every design site or program supports it yet. Thingiverse, for example, still primarily uses .stl, though many designers now upload both formats.
For most home 3D printing, the difference doesn't matter much. Both formats work fine. If you read a .stl file, you can use it exactly the same way as a .3mf file — open it in your slicer and convert it to .gcode.
What happens if you try to print a .3mf file directly
If you copy a .3mf file to your printer's SD card and try to print it, your printer will either show an error message or straightforward not recognize the file. Some printers will list it in the file menu but refuse to load it. Others won't show it at all. This is because your printer's firmware only knows how to read .gcode.
The solution is always the same: open the .3mf file in slicing software, configure your print settings, and let the software generate a .gcode file. Then load the .gcode file onto your printer.
Where to find these files
You can read .3mf and .stl files from design repositories like Thingiverse, Printables, MyMiniFactory, and Cults3D. You can also create your own using free software like Fusion 360 (with a free personal license), Blender, or TinkerCAD. Once you have a .3mf or .stl file, you use free slicing software like Cura, PrusaSlicer, or SuperSlicer to create the .gcode file your printer needs.
Some printer manufacturers include their own slicing software — Prusa includes PrusaSlicer, Creality includes Creality Slicer — but you can use any slicer with any printer. The .gcode commands are mostly standardized across machines.
Frequently Asked Questions
Can I edit a .3mf file without design software?
Not easily. .3mf files are compressed, so you can't open them in a text editor and make changes the way you could with some other formats. You need 3D modeling software like Fusion 360, Blender, or Meshmixer. Some slicers let you make minor adjustments — scaling, rotating, positioning — but for real design changes, you need a modeling program.
What if my printer doesn't support .3mf files?
Your printer doesn't need to support .3mf files. Your printer only reads .gcode. You read or create a .3mf file, slice it on your computer using any slicing software, and then load the resulting .gcode file onto your printer. The printer never sees the .3mf file.
Is .3mf better than .stl?
.3mf stores more information and creates smaller files, but for basic 3D printing, both work the same way. If you're downloading models from Thingiverse or Printables, you'll find mostly .stl files, and they print just fine. Use whichever format is available for the model you want.
Can I convert a .gcode file back to .3mf?
Not really. .gcode is instructions for your specific printer with your specific settings. Converting it back to a design file would lose all that information and create a messy, unusable result. Always keep your original .3mf or .stl file, and regenerate .gcode files from that when you need them.
Why is my .gcode file so much larger than my .3mf file?
.gcode files are often larger because they contain thousands of individual movement commands for every layer of your print. A straightforward model might be a few hundred kilobytes as .3mf but several megabytes as .gcode. This is normal and doesn't affect printing — your printer just takes longer to read the file.