| Scenario | Why conversion is needed | |----------|--------------------------| | Version control (Git) | Git struggles with binary .sb3 , but works fine with extracted folders. Need to repack to .sb3 after editing. | | Collaborative editing | Multiple people edit assets/text files in extracted structure → need to rebuild .sb3 . | | Automated workflows | CI/CD pipelines generate Scratch projects from templates (e.g., converting JSON + assets to .sb3 ). | | Recovery from corrupted .sb3 | If only a ZIP backup exists, rename is insufficient if structure changed. | | Educational tools | Teaching file formats: students explore .sb3 by unzipping, then reconstruct it. |
Delete .zip from the end of the filename and type .sb3 instead.
Select (do not select the parent folder itself).
: When re-archiving assets, you must select the files inside the folder, not the outer folder itself. If the project.json file is buried inside a subfolder within the ZIP, Scratch cannot read it. Zip To Sb3 Converter
This guide explores why these files are linked, how to convert them manually, and the best tools for the job. Understanding the Link: Is an SB3 Just a ZIP File?
Educators and researchers sometimes need to analyze the internal structure of Scratch projects en masse. Converting SB3 files to ZIP and extracting the JSON files allows for programmatic analysis of thousands of projects at once.
);
To minimize the risk of corruption and ensure smooth conversions, consider these best practices:
For the technically inclined, converting a ZIP file to an SB3 file is a two-step process, but it requires careful attention to file naming.
containing the project.json and assets. Right-click the file and select "Rename." Change the end of the filename from .zip to .sb3 . A warning will appear asking if you’re sure; click Yes . | Scenario | Why conversion is needed |
Developers building tools for Scratch sometimes need to generate or modify projects automatically. The sb-edit library and similar tools allow programmatic creation of SB3 files by constructing the appropriate ZIP structure with a JSON payload.
def zip_to_sb3(input_zip_path, output_sb3_path): with zipfile.ZipFile(input_zip_path, 'r') as zin: # Check for project.json if 'project.json' not in zin.namelist(): raise ValueError("No project.json found") # Validate JSON minimally with zin.open('project.json') as f: data = json.load(f) if 'targets' not in data: raise ValueError("Invalid Scratch project") # Repackage with no compression with zipfile.ZipFile(output_sb3_path, 'w', zipfile.ZIP_STORED) as zout: for item in zin.infolist(): zout.writestr(item, zin.read(item.filename))
For Scratch enthusiasts, developers, and educators, the ability to manipulate project files is crucial. A .sb3 file is the standard format for Scratch 3.0 projects, but it is actually a compressed containing JSON data, sound files, and images. | | Automated workflows | CI/CD pipelines generate
Usage (quick)
Converting an SB3 file back to ZIP is an equally simple process, often used for extracting project assets.