Silhouette cutters (Cameo, Portrait, Curio) run on Silhouette Studio. The free edition saves designs only as .studio3, and exporting SVG needs a paid edition. The usual workaround is to screenshot your design and trace it in Inkscape.
I wanted the real geometry, so I decoded the file format and built studio3svg: a zero-dependency JS library, a CLI, and a web page that converts in your browser.
- Web app: https://zaydmulani09.github.io/studio3svg/
- Code + spec: https://github.com/zaydmulani09/studio3svg
How it was decoded
I never ran Silhouette Studio. I unpacked the installer inside an isolated WSL distro under Wine. The format itself was worked out from files that real users had saved.
-
Container. The
silhouette05;magic is followed by a table of u64 section sizes that add up to the file length exactly. One section is a PNG preview that Studio renders on save. -
Blocks. The document is a tree of
0x01 + u32 sizeblocks. - Paths. Each shape stores its outline already placed on the page, in millimetres. It is a list of subpaths of points, each point with optional Bézier handles.
- Handles: absolute or relative? Card templates with a known 3 mm corner radius settled it. Read as offsets from their point, every corner sample lands 3.000 mm (±0.01) from the arc centre.
Tricks that kept me honest
- Ground truth. An MIT card-template generator publishes the intended layout for each file. Every card matches to 0.02 mm.
-
The file grades itself. Every
.studio3embeds a preview rendered by Silhouette Studio, so I overlay the decoded outlines onto it. 224 of 225 comparable files agree. A negative control makes sure the measure rejects geometry that is 7% off. - Fuzzing. 2,000 seeded corruptions plus truncation at every length. The result is always a clean error, never a crash.
Bugs the differential caught
- Raw transform bytes can look like a block header. A greedy parser silently skipped every other card, and indexing every candidate offset fixed it.
- Empty subpaths store their last-point index as
-1. - Studio 4 files declare a final section a few bytes longer than the file.
Not done yet
Colours, layers, raster images and effect output (like puncher holes) aren't decoded yet. SPEC.md has a coverage matrix with a confidence level for each part. PRs and sample files welcome.
Top comments (1)
224 of 225 files matching is a solid result, did you ever work out what the odd one out was doing?