Is it possible to convert a .Sketch file to an .SVG?

19.5k Views Asked by At

Is it possible to convert a Sketch file to an SVG without actually having Sketch or DrawIt? I know it's theoretically possible since they're both vector, but I use Windows and Linux, so I don't have a Mac to open the files with.

2

There are 2 best solutions below

2
On BEST ANSWER

There's no "magic" about "Sketch using a lot of technology that is exclusive to OS X" or not. That statement on Sketch makers' website is in the context that they do not intend to make Sketch app available on linux and on windows.

The real problem you have is as follows:-

The sketch file is an sqlite3 file and in it there are (currently at this time of writing) two tables, meta and payload. The payload table is a single key-value store, storing main and and BLOB value. So that's where you get stuck - you will have to figure out how to reverse engineer the BLOB if you do not have a Sketch program.

On the other hand, if you do have a Sketch program, you do not need to reverse engineer anything, you can query information from your Sketch file using Sketch Plugin APIs, which are well documented here - http://bohemiancoding.com/sketch/support/developer/ - which will allow you to automate a lot of the tasks if you have a complicated design workflow. http://zeplin.io is an example of a simple Sketch plugin that pulls out relevant "spec" information for a developer from a designer-created sketch artboard.

But back to your original question, Sketch itself allows you to export SVG files but that assumes you have the Sketch app. Long story short, unless you reverse engineer the BLOB binary in the sketch file (or use a tool that someone else created that can), you can't programmatically translate sketch files into SVG files without having a Sketch app.

1
On

Figma is currently free for anyone to sign up and supports both Sketch import and SVG export. It's a fully-featured design tool that's browser-based so it should work on all three major platforms (OS X, Windows, and Linux). File import from Sketch isn't a perfect 1-to-1 mapping with Figma because both apps have slightly different feature sets, but it should get you 99% of the way there.