This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
The red hacked block.
The block as a Cat Block.

An undefined hat block[1] was a block that generated when attempting to load an invalid block. Blocks could not be connected to the undefined hat block, and it did not have any function. Some Scratchers call it a Hat Block,[2] but it was actually a combination of both a hat and Cap Block. It did not have an input, and was the only red block in Scratch 3.0. Unlike other blocks, it did not have an outline, and did not change color when the Color Mode was set to High Contrast. It was removed in April of 2026, following an update to the Online Editor.

Attempting to comment on an Undefined Hat Block caused an invisible and corrupted comment to generate. If a sprite had an Undefined Hat Block with the corrupted comment, switching to the Costume Editor or Sound Editor and back to the Code Tab would have caused a crash, although switch to another sprite and back would have simply remove the comment instead. Attempting to drag an Undefined Hat Block with a corrupted comment would have caused the block to stick to the cursor, even after attempting to let go. Going to a different sprite while it was stuck to the mouse caused the block to disappear from the cursor, and attempting to go back to the original sprite caused the Context Menu to stop working and made all blocks within the project immobile.

Generating

Because this block was never found in the block palette, it required the below methods to make:

Method 1

One way of generating this block was to edit the project's .JSON file.[3] The steps were as follows:

  1. Make a new project and drag any block.
  2. Save the project to the computer and change the project's .sb3 file extension to .zip.
  3. Decompress the .zip file, and locate the project.json file from the generated folder
  4. Open the project.json file, locate the block's opcode, and rename it to an invalid or non-existent one.
  5. Recompress the folder, change the file extension back to .sb3, and load the project into Scratch.
  6. Once the project loaded, an undefined hat block would have appeared.

Method 2

An undefined hat block could simply be put in the backpack from another person's projects.

Method 3

Trying to create a custom block with a name containing a control character, such as the backspace character or a NAK (Negative Acknowledge) character previously caused the creation of an undefined block.[4]

NAK (U+0015) can be copied from the browser: First, search for %15. Then copy the character from the search bar. If the character was pasted into a custom block, the undefined hat block would have appear. However, putting it into an existing project would have caused caused every script in the project to disappear (although the scripts would have remained functional).

Trying to do this again after the removal of the block will just generate the character inside the custom block.

Removal

The hat block was removed in April of 2026, following an update to the Online Editor. Despite this, it still works in the Offline Editor and in Scratch Lab.

One can still have the undefined block inside their Backpack[5], but attempting to put this block back inside the project using it won't generate the block at all and instantly delete it.[citation needed]

Controversies

Some users on the Discussion Forums wanted the hat block back after the removal,[6][7] because they found the functionality of the block interesting. Some also treated the removal as a bug.[8][9]

However, the Scratch Team has stated that bringing back the block will not happen,[10] as the removal was a bugfix.[11]

See Also

References

  1. ↑ editor:1110977910
  2. ↑ projects:466308976[dead link]
  3. ↑ projects:516107665
  4. ↑ projects:382149602/#comments-216521624
  5. ↑ projects:1324228084
  6. ↑ topic:881750
  7. ↑ topic:882406
  8. ↑ topic:879259
  9. ↑ topic:908777
  10. ↑ Paddle2See. (2026-10-20). "Exactly. Just goes to show that you can never make everybody happy at the same time." post:9460363
  11. ↑ ScodexPerson. (2026-10-18). "Removing the red block was a bugfix." post:9456682
Cookies help us deliver our services. By using our services, you agree to our use of cookies.