This page has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the Internet, as we can't guarantee the safety of other websites.

Blocks are puzzle-piece shapes that are used to create code in Scratch. The blocks connect to each other vertically like a jigsaw puzzle, where each data type (hat, stack, reporter, boolean, or cap) has its own shape and a specially shaped slot for it to be inserted into, which prevents syntax errors. Series of connected blocks are called scripts.

There are ten categories of blocks: Motion, Looks, Sound, List, Event, Control, Sensing, Operators, Variables, and My Blocks. Only nine of these are shown in the Block Palette.

In total, there are seven Hat Blocks, five C Blocks, thirty-one Reporter Blocks, thirteen Boolean Blocks, two Cap Blocks and fifty-nine Stack Blocks.
 Note: Block numbers do not include extensions.

## Block Shapes

There are six different block shapes: Hat, Stack, Boolean, Reporter, C and Cap.

### Hat blocks

The shape of a Hat block.
Main article: Hat Block

Hat blocks are the blocks that start every script. They are shaped with a rounded top and a bump at the bottom — this is so you can only place blocks below them. There are 11 Hat blocks in the Scratch editor, six of which are in the Events category, one in the Control category, and one in the category My Blocks (if one has created one custom block).

### Stack blocks

The shape of a Stack block.
Main article: Stack Block

Stack blocks are the blocks that perform the main commands. They are shaped with a notch at the top and a bump on the bottom — this is so blocks can be placed above and below them. There are 77 Stack blocks — the most common block shape.

### Boolean blocks

The shape of a Boolean block.
Main article: Boolean Block

Boolean blocks are the conditions — they are either true or false. For example, asking a computer: "Does 2 + 2 = 4?", and it would either tell you "Yes" or "No". With a hexagonal shape, there are 13 of these blocks.

### Reporter blocks

The shape of a Reporter block.
Main article: Reporter Block

Reporter blocks are the values. Reporter blocks can hold numbers and strings. It is like asking a friend, for example, "What is 2 + 2?", and they would answer "4". It can also report a variable. For example, "What is your age?" and they may answer: "15". Shaped with rounded edges, there are 37 of these blocks — not counting the theoretically infinite amount of Reporter blocks that can be made for each variable and list.

### C blocks

The shape of one of the C blocks.
Main article: C Block

C blocks are blocks that take the shape of "C's". Also known as "Wrap blocks", these blocks loop the blocks within the Cs or check if a condition is true. There are five C blocks, and they can be found in the Control category. C blocks can be bumped at the bottom, or capped.

### Cap blocks

The shape of a Cap block.
Main article: Cap Block

Cap blocks are the blocks that end scripts. They are shaped with a notch at the top and a flat bottom — this is so you cannot place any blocks below them. There are two Cap blocks which can both be found in the Control category.

## List of Blocks

There are 119 blocks in Scratch 3.0 (not including extensions):

### Motion blocks

Main article: Motion Blocks

Motion blocks are the blocks that control a Sprite's movement. There are 17 Motion blocks in Scratch 3.0.

Scratch 3.0 has the following fifteen Motion Stack blocks:

Scratch 3.0 has the following three Motion Reporter blocks:

### Looks blocks

Main article: Looks Blocks

Looks blocks are the blocks that control a sprite's look. There are 23 Looks blocks in Scratch 3.0. Three of the 19 sprite Looks blocks have a counterpart for the Stage.

Scratch 3.0 has the following eighteen Looks Stack blocks:

Scratch 3.0 has the following three Looks Reporter blocks:

### Sound blocks

Main article: Sound Blocks

Sound blocks are the blocks that control sound and MIDI functions. There are 16 Sound blocks in Scratch 3.0.

Scratch 3.0 has the following eight Sound Stack blocks:

Scratch 3.0 has the following Sound Reporter block:

### Data blocks

#### Variables blocks

Main article: Variables Blocks

Variables blocks are the blocks that hold values and strings. There are 5 Variables blocks in Scratch 3.0.

Scratch 3.0 has the following four Variables Stack blocks:

Scratch 3.0 has the following Variables Reporter block:

#### List blocks

Main article: List Blocks

List blocks are the blocks that manage lists. They are stored in the Data category. There are 11 List blocks in Scratch 3.0.

Scratch 3.0 has the following six List Stack blocks:

Scratch 3.0 has the following 4 List Reporter blocks:

Scratch 3.0 has the following List Boolean block:

### Event blocks

Main article: Events Blocks

Event blocks are blocks that control events and the triggering of scripts. There are 8 Event blocks in Scratch 3.0.

Scratch 3.0 has the following six Event Hat Blocks:

Scratch 3.0 has the following two Event Stack blocks:

### Control blocks

Main article: Control Blocks

Control blocks are the blocks that control scripts. There are 11 Control blocks in Scratch 3.0.

Scratch 3.0 has the following one Control Hat block:

Scratch 3.0 has the following three Control Stack blocks:

Scratch 3.0 has the following five Control C blocks:

Scratch 3.0 has the following two Control Cap blocks:

### Sensing blocks

Main article: Sensing Blocks

Sensing blocks are the blocks that detect things. There are 21 Sensing blocks in Scratch 3.0.

Scratch 3.0 has the following three Sensing Stack blocks:

Scratch 2.0 has the following two Sensing Boolean blocks:

Scratch 2.0 has the following ten Sensing Reporter blocks:

### Operators blocks

Main article: Operators Blocks

Operators blocks are the blocks that perform math functions and string handling. There are 18 Operators blocks in Scratch 3.0.

Scratch 3.0 has the following seven Operators Boolean blocks:

Scratch 3.0 has the following eleven Operators Reporter blocks:

Right-clicking some of the blocks will yield more choices of its type.

### My blocks

Main article: My Blocks

My blocks are user-made custom blocks. There are 2 unique kinds of My blocks in Scratch 3.0.

Scratch 3.0 has the following My Blocks Hat block:

Scratch 3.0 has the following My Blocks Stack block:

## Scratch Block Plugin

Main article: Block Plugin

The Block Plugin allows one to write blocks and scripts to appear on the Scratch Forums and Scratch Wiki, as well as other websites with the included JavaScript. It is written by the Scratcher blob8108.

## Editing the Block Colors

 This article or section documents something not included in the current version of Scratch (3.0). It is only useful from a historical perspective.
Editing the block colors.
Main article: Edit Block Colors

In the online Scratch 2.0 editor, one could edit the colors of the blocks by shift-clicking the Edit menu and choosing an option called "Edit block colors". By selecting this, a menu would appear with 3 HSL sliders and tools for modifying the block colors of a specific block category. Personalized colors could be saved to one's computer, but loading the colors did not work properly.[citation needed]

## In Other Programming Languages

Scratch is one of the original languages ever to use blocks, inspiring other languages to inherit the idea. Scratch modifications contain many new blocks typically that are not present in Scratch. MIT, where Scratch is made, has also created other languages using blocks such as the MIT App Inventor. Stencyl is a highly-professional language that features an entire block interface for programming real-time apps and online games. Scratch Jr also has blocks which are even more friendly for younger children to understand.