Compared
Binary G-code (.bgcode) vs plain .gcode
Published · How we check our guides
Short answer
Binary G-code (.bgcode) is the same printer instructions as .gcode, stored in a compact binary format from Prusa with built-in checksums, metadata and thumbnails. The files are much smaller and faster to transfer. Prusa's newer printers read it; other printers need plain .gcode.
The difference in one table
| Feature | .gcode | .bgcode |
|---|---|---|
| What it is | Plain text, one command per line | Binary blocks, compressed |
| Size | Large | Much smaller (about a third, in our test below) |
| Damage check | None built in | Checksum on every block |
| Thumbnails and print info | As comments, if the slicer adds them | Stored in their own blocks |
| Readable in a text editor | Yes | No |
| Printers | Almost every FDM printer | Prusa’s newer printers (MK4/MK4S, MK3.5/MK3.9, Core One, and MINI and XL on firmware 5.1 or later) |
How much smaller, really?
We compared one print stored both ways: a small 12.5 mm box sliced in PrusaSlicer 2.8.1 for the MK4S (from Prusa’s own libbgcode test files). As plain G-code it’s 85.8 KB; as binary G-code, 26.8 KB, 69% smaller. Bigger prints save more in absolute terms, which is what makes uploads over Wi-Fi and Prusa Connect faster.
The instructions themselves don’t change. A .bgcode is the same moves, temperatures and fan settings, packed with compression (Heatshrink with the MeatPack G-code encoding, and Deflate for the metadata) instead of written out as text. Prusa puts the saving at about 70% on average.
Who makes .bgcode files
PrusaSlicer has written binary G-code since version 2.7 when the selected printer supports it. You can switch it off per printer in Printer Settings → General → Firmware → Supports binary G-code, or for every printer in Configuration → Preferences → Other → Use binary G-code when the printer supports it. Other slicers (Cura, Bambu Studio, OrcaSlicer) write plain .gcode, or .gcode.3mf for Bambu printers.
How to open a .bgcode file
- In your browser: the G-code viewer opens .bgcode directly and shows each layer, the print time, filament and the thumbnails. Nothing is uploaded.
- In PrusaSlicer: the bundled G-code Viewer (File → G-code preview) opens it too.
- As text: PrusaSlicer converts between the two under File → Convert (“Convert binary G-code to ASCII” and back), and Prusa’s open-source
libbgcodehas a command-line converter.
Will my printer read it?
Only if its firmware knows the format. If a non-Prusa printer (or an old MK3S) sees a .bgcode, it either ignores the file or fails to print. Turn binary output off in PrusaSlicer for those printers, or convert the file to plain G-code first.
Can I turn a .bgcode back into an STL?
No, not cleanly. G-code (binary or not) is the result of slicing: nozzle paths, layer by layer. The original surface isn’t in it, so there’s nothing to export as a printable model. Tools that rebuild a mesh from toolpaths produce a rough, ridged copy at best. Ask for the STL, 3MF or STEP, or download it again from where you found the print.
Related: Bambu’s .gcode.3mf
Bambu Lab solved the same problem (G-code plus thumbnails and print info in one file) differently: a zip folder with plain G-code inside. See what a .gcode.3mf file is.