This is a quick hack at a converter from .sb2 to .c Fetch the json file from the API URL: http://projects.scratch.mit.edu/internalapi/project/$(INSERT_PROJECT_NUMBER_HERE)/get/ It parses the Scratch program with a lightweight json parser called jsmn written by a Russian guy called Serge (http://zserge.com/jsmn.html) I retrofitted some code to his parser to convert it from a simple left/right scanner to something that builds a tree structure. (see procedure 'reorder') My code walks the parse tree and outputs very literally translated C. It doesn't pretend to do a complete translation, this was just a proof of concept prototype. There's a lot could be added, but I stopped for a break and to think about wat is needed after I got the basics in place. The generated C file needs to be cleaned up using GNU Indent. (There's a ".indent.pro" file in this directory though it may not be visible) (I also run a quick edit macro on the cleaned up file in order to remove some redundant semicolons. If you want to do the same, fetch my editor from http://ecce.sourceforge.net/ecce.c and compile it. But it'll be fine without this. Or you could clean it up with AWK or SED instead. I just use the tools I'm used to.) Files to look at: http://www.gtoal.com/scratch/sb2c/sb2c.c.html - the converter http://www.gtoal.com/scratch/sb2c/jsmn.c.html - the parser http://www.gtoal.com/scratch/sb2c/jsmn.h.html - the parser The C code is unix specific because I'm lazy and using mmap was the quickest way to load the json file into memory. It could easily be rewritten to use stdio and would compile on Windows. Graham