Skip to content

File Format

This section will be expanded once other stuff gets documented. For now, runtime behavior is more pressing than file formatting.

Scratch projects can be saved and loaded from a computer as files. Scratch has several project file formats, each with their own complicated structures and loading behaviors. Even with a perfectly accurate runtime environment, a saved project that is not properly loaded may not work as it was intended to, and could very well break! The purpose of this section is to lay out how project files are created and interpeted.

SB3

The .sb3 file format is the standard format for storing Scratch 3.0 projects, the version of Scratch that this specification documents. In reality, it is a renamed .zip file that contains the following files:

  • project.json, a .json file storing info.
  • Various image files used as costumes.
  • Various audio files used as sounds.

TODO: Specify!!!

SB2

The .sb2 file format is the standard format for storing Scratch 2.0 projects, the version of Scratch preceding Scratch 3.0, the version that this specification documents.

The standard Scratch 3.0 editor is compatible with .sb2 files. It has a procedure for converting .sb2 files to .sb3 files, which it then loads.

TODO: Specify!!

SB

The .sb file format is the standard format for storing projects from Scratch 1.4 and earlier, which are early versions of Scratch that work drastically different than modern Scratch due to the major changes in between. Unlike .sb2 and .sb3 files, .sb files are stored in binary using a much less human-readable format.

Despite major differences, the standard Scratch 3.0 editor remains compatible with .sb files. It has a procedure for converting .sb files to .sb2 files, which it then converts to .sb3 files and loads.

TODO: Specify!