This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
This article is a stub. It may be incomplete, unfinished, or have missing parts/sections. If the article can be expanded, please do so! There may be suggestions on its talk page. (January 2026)
This article or section documents an outdated version of Scratch (version 0.x). For this article in Scratch 1.4, see Scratch File Format (1.4). For this article in Scratch 2.0, see Scratch File Format (2.0).


The Scratch 0.x file format is the file format used to store exported Scratch 0.x projects. Projects have the extension .scratch.

Overview

When a project file was saved, it was stored as serialized Squeak Smalltalk objects instead of readable code. .scratch files were saved using Squeak’s ImageSegment serialization mechanism, meaning it preserves a snapshot of live objects from memory and writes them directly to disk. It was discontinued upon the release of 1.0, although available until 2.0,[1] due to not having a code format, as they consist of binary serialized Squeak Smalltalk objects rather than textual source code.

Saving a .scratch file

The save button being hovered over back in Scratch 22Dec04
The save as file box back in 13Oct04.
Example of saving a file in 11Oct03.

11Oct03, 8Dec03, 14Feb04 and 16Mar04.

  1. Click the lined paper, a drop down for saving will appear.
  2. Click the "save" button, a "File name?" box will appear.
  3. Put in the desired file name in the box.
  4. Click the "Accept(s)" button to save the file.

13Oct04 and 22Dec04.

  1. Click the floppy disk icon, a box saying "File name?" will appear.
  2. Put in the desired name in the text area.
  3. Click the "Okay" button to save the file.

Loading a .scratch file

1.0, 1.1, 1.2.x, 1.3.x and 1.4.

Note Note: blocks made obsolete in the later versions of scratch during development such as beep :: sound will become Obsolete!, or red blocks, as they will not work.


  1. Open the offline scratch editor
  2. Check to see if the scratch offline editor version is before 2.0
  3. Download a .scratch file. You can find projects that use the file format here
  4. Open your operating system file manager app
  5. Find the file that has the extension .scratch
  6. Drag and drop the file onto the editor

Internal Structure

A .scratch file has the following general structure:

  • Serialized Morphic objects (visual interface elements)
  • Sprites (SpriteMorph Eg: Sprite1 and )
  • The Stage (StageMorph Eg: )
  • Scripts (ScriptMorph)
  • Individual blocks (BlockMorph subclasses)
  • Costumes (Form objects)
  • Sounds (SoundBuffer objects)
  • Variables and lists
  • UI layout and block positioning data

Every element in a .scratch file is stored in interconnected Smalltalk objects with references to one another preserved exactly as they existed in memory at the time they were saved.

See Also

Gallery

References

  1. ↑ If you drag and drop a .scratch file onto a later Squeak version of Scratch such as 1.4, it will read the file and load it. However, if it contains blocks made obsolete in later versions, they will not work.
    The red blocks in the picture are obsolete blocks that failed to load when imported from a .scratch file. Another example can be found here.