sb3fix - fix corrupted Scratch projects
sb3fix fixes common problems that make Scratch projects not be able to load. It's not magic, but it has successfully recovered many projects and continues to improve. Just put your projects into the input below.
If you use TurboWarp, please first try File > Restore Points to access a previous version of your project. sb3fix is a community project and is not affiliated with the Scratch Team.
If your project is still broken
Please get your project to us. A real human will try to fix your project. If you have a GitHub account, the easiest way is to open a GitHub issue. Put your project file inside a zip, then you'll be able to attach it to the issue.
Don't waste your time asking AI to fix corrupted projects. It won't be able to help you, but it will happily gaslight you into thinking it does.
How sb3fix works
A Scratch project has three main components that can be "corrupted" in different ways.
Scratch project files are zip files. The zip file can often be corrupted by a storage device failure, for example, due to a power outage or not ejecting a USB drive before unplugging. Scratch and most other tools that open zips don't know how to handle corruption. sb3fix uses an alternative approach (similar to this post) that lets it read a zip file even when the "central directory" used by most apps is missing or corrupt. Depending on how badly the zip is corrupted, sb3fix might recover your project in its entirety or may miss significant parts.
Examples of error messages due to zip corruption
Failed to unzip and extract project.json, with error: Error: Corrupted zip: can't find end of central directoryFailed to unzip and extract project.json, with error: Corrupted zip or bug: unexpected signature (\x00\x00\x00\x00, expected \x50\x4B\x03\x04)Bug : uncompressed data size mismatch
Inside the zip is a file called project.json. This file contains your project's sprites, scripts, variables, lists, and metadata about costumes and sounds. When you load a project, Scratch checks that all parts of the JSON are in the correct format. There are bugs that allow the project.json that gets generated when you save your project to not pass these checks. sb3fix checks for a bunch of these failure cases and changes the JSON to make the checks pass. This usually results in your whole project being recovered, and writing new fixes is usually easy when we become aware of missing fixes.
Examples of error messages due to project.json corruption
Error: Unknown extension: ...Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[2].variables['32!k|mRA^e^r;{*i9Z[p-getParam,number1,r-'][0]","schemaPath":"#/items/0/type","params":{"type":"string"},"message":"should be string"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[1].costumes[0].name","schemaPath":"#/properties/name/type","params":{"type":"string"},"message":"should be string"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[1].sounds[0].name","schemaPath":"#/properties/name/type","params":{"type":"string"},"message":"should be string"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[2].blocks['b'].inputs['MESSAGE'][1]","schemaPath":"#/definitions/optionalString/oneOf/0/type","params":{"type":"string"},"message":"should be string"},{"keyword":"type","dataPath":".targets[2].blocks['b'].inputs['MESSAGE'][1]","schemaPath":"#/definitions/optionalString/oneOf/1/type","params":{"type":"null"},"message":"should be null"}, ...}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"enum","dataPath":".targets[0].name","schemaPath":"sb3_definitions.json#/definitions/stage/properties/name/enum","params":{"allowedValues":["Stage"]},"message":"should be equal to one of the allowed values"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"minItems","dataPath":".targets[0].costumes","schemaPath":"#/properties/costumes/minItems","params":{"limit":1},"message":"should NOT have less than 1 items"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"required","dataPath":".targets[0].costumes[0]","schemaPath":"#/required","params":{"missingProperty":"assetId"},"message":"should have required property 'assetId'"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf/0/type","params":{"type":"string"},"message":"should be string"},{"keyword":"type","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf/1/type","params":{"type":"number"},"message":"should be number"},{"keyword":"oneOf","dataPath":".targets[0].variables['`jEk@4|i[#Fk?(8x)AV.-my variable'][1]","schemaPath":"#/definitions/stringOrNumber/oneOf","params":{"passingSchemas":null},"message":"should match exactly one schema in oneOf"}...}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[0].videoState","schemaPath":"sb3_definitions.json#/definitions/stage/properties/videoState/type","params":{"type":"string"},"message":"should be string"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"type","dataPath":".targets[1].x","schemaPath":"sb3_definitions.json#/definitions/sprite/properties/x/type","params":{"type":"number"},"message":"should be number"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"maxLength","dataPath":".targets[0].comments['d'].text","schemaPath":"#/properties/text/maxLength","params":{"limit":8000},"message":"should NOT be longer than 8000 characters"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"enum","dataPath":".targets[1].rotationStyle","schemaPath":"sb3_definitions.json#/definitions/sprite/properties/rotationStyle/enum","params":{"allowedValues":["all around","don't rotate","left-right"]},"message":"should be equal to one of the allowed values"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}Could not load project: {"validationError":"Could not parse as a valid SB2 or SB3 project.","sb3Errors":[{"keyword":"enum","dataPath":".targets[1].isStage","schemaPath":"sb3_definitions.json#/definitions/sprite/properties/isStage/enum","params":{"allowedValues":[false]},"message":"should be equal to one of the allowed values"}],"sb2Errors":[{"keyword":"required","dataPath":"","schemaPath":"#/required","params":{"missingProperty":"objName"},"message":"should have required property 'objName'"}]}
The last part of a Scratch project is your project's costumes and sounds, known as assets. Assets are also files in the zip and use standard file formats such as PNG, SVG, WAV, and others. Corrupted costumes appear as a question mark in a gray box, and corrupted sounds are replaced with zero-second sounds. There are other bugs that can result in these symptoms even if the asset is not corrupt. Some corrupted costumes load fine but cause a crash if you try to edit them. At this time, sb3fix does not attempt to fix asset corruption beyond our attempts to fix zip corruption. Asset corruption is not common and is rarely catastrophic as the rest of the project can still load.
sb3fix is open source at https://github.com/TurboWarp/sb3fix
Privacy
Files are processed locally on your computer and never sent to any server.