kids encyclopedia robot

Scratch (programming language) facts for kids

Kids Encyclopedia Facts
Quick facts for kids
Scratch
Scratch logo
Logo used since 16 October 2015
Scratch editor screenshot.png
Scratch 3.0 editor
Paradigm Event-driven, block-based programming language
Developer Scratch Foundation
First appeared
  • 11 October 2003; 22 years ago (2003-10-11) (prototype Scratch 0.1)
  • 15 May 2007; 18 years ago (2007-05-15) (Scratch 1.0)
  • 9 May 2013; 12 years ago (2013-05-09) (Scratch 2.0)
  • 2 January 2019; 6 years ago (2019-01-02) (Scratch 3.0)
Stable release
  • Scratch 3.0 (online editor) / 2 January 2019; 6 years ago (2019-01-02)
  • Scratch 3.29.1 (offline editor) / 27 February 2022; 3 years ago (2022-02-27)
Implementation language Squeak (Scratch 1.x)
ActionScript (Scratch 2.0)
HTML5, JavaScript (Scratch 3.0)
OS Microsoft Windows, macOS, Linux (via renderer), HTML5 (via web browser), iOS, iPadOS, and Android.
License

GNU Affero General Public License (Scratch 3.0)

  • BSD 3-Clause (earlier versions of 3.0),
  • GPLv2 and Scratch Source Code License (1.x)
Filename extensions .sb, .sprite (Scratch 1.x)
.sb2, .sprite2 (Scratch 2.0)
.sb3, .sprite3 (Scratch 3.0)
Influenced by
Logo, Smalltalk, HyperCard, StarLogo, AgentSheets, AgentCubes, Etoys, Snap!
Influenced
Catrobat, ScratchJr, Snap!, mBlock, Turtlestitch

Scratch is a special kind of computer language. It uses colorful blocks that you can snap together like LEGOs. This makes it easy to create your own computer programs. It's mostly for kids and teens, helping them learn how to code. You can make cool things like video games, animations, music, and even simulations.

Scratch was created by the MIT Media Lab in the United States. It's used all over the world and has been translated into more than 70 languages. Many schools, clubs, and homes use Scratch to teach coding. As of February 2023, over 103 million people have used Scratch. They have shared more than 123 million projects. The website gets over 95 million visits every month. In total, more than 1.15 billion projects have been created. The one billionth project was made on April 12, 2024.

The name "Scratch" comes from a technique used by disk jockeys. They "scratch" vinyl records to mix sounds and create new music. In the same way, Scratch lets you mix different pictures, sounds, and code. You can create new projects or change (remix) projects made by others.

Exploring Scratch 3.0

How the Scratch Editor Works

Dialogo scratch Best Friends 1
A program to change the background and make a sprite speak

The Scratch editor is where you build your projects. It has three main parts:

  • The stage area is where you see your project come to life. This is where your characters (called sprites) move and interact.
  • The block palette holds all the colorful code blocks. These blocks are grouped by what they do, like "Motion" or "Looks."
  • The coding area is where you drag and snap blocks together. This creates scripts that tell your sprites what to do. You can start your code by clicking the green flag.

You can also make your own special code blocks. These appear in a section called "My Blocks."

The stage uses an x and y coordinate system. The very center of the stage is 0,0.

When you select a sprite, you can drag code blocks to it. The "Costumes" tab lets you change how your sprite looks. You can draw new costumes or edit existing ones. The "Sounds" tab lets you add sounds and music to your sprite.

You can create sprites and backgrounds in a few ways. You can draw them yourself, pick from Scratch's library, or upload your own images.

Here are the main categories of programming blocks in Scratch:

Block categories in Scratch
Category What it does
Motion Makes sprites move, turn, and change position.
Looks Controls how sprites appear, like changing size or costume.
Sound Plays sounds and music.
Events Starts your code when something happens, like clicking the green flag.
Control Helps your code make decisions, repeat actions, or wait.
Sensing Lets sprites detect things, like touching another sprite or the mouse pointer.
Operators Does math, compares numbers, or combines words.
Variables Stores information, like a score in a game.
Lists Stores many pieces of information in an organized way.
My Blocks Lets you create your own custom code blocks.
Extensions Adds more special blocks and features.

Coding Without Internet

Scratch Beginner Scripts
Four different scripts for the getting started built-in tutorial
Example script of asking the user their name, and it says "Hello, (name)!"
A coded example, using the ask block for the users' name, then responding with it

You can use Scratch even without an internet connection. There's a special "Desktop Editor" for Scratch 3.0. It works on Microsoft Windows 10 and newer, Apple's macOS, ChromeOS, and Android devices. There's also an unofficial version for Linux. This lets you create and play Scratch projects offline. Older versions of Scratch (2.0 and 1.4) also had offline editors.

Adding More Features with Extensions

Scratch Extensions Page
An example of the Scratch 3 Extensions Page

Extensions add extra blocks and features to your Scratch projects. In Scratch 3.0, there are both hardware and software extensions. Hardware extensions let you connect Scratch to physical devices. Software extensions add new digital tools.

Physical Extensions

These extensions help you control real-world devices:

  • LEGO Mindstorms EV3 – Control robots and get information from sensors.
  • Makey Makey – Use everyday objects to control your projects.
  • LEGO Education WeDo 2.0 – Control motors and get sensor data from Lego WeDo models.
  • micro:bit – Use a micro:bit mini-computer to control projects.
  • LEGO BOOST – Bring your robotic creations to life.
  • Go Direct Force & Acceleration – Measure pushes, pulls, and movement.

Digital Extensions

Some digital extensions used to be regular block categories. They were moved to extensions to keep the main palette tidy:

  • Music – Play digital instruments like drums, trumpets, and pianos.
  • Pen – Draw lines and shapes on the stage with different colors and thicknesses.
  • Video Sensing – Detects motion using your computer's camera.

New digital extensions have also been added:

  • Text to Speech – Turns written words into spoken voices. It has different voices and languages.
  • Translate – Uses Google Translate to change text from one language to another.
  • Makey Makey – Offers more ways to use keyboard presses in your projects.

Some people have suggested that the music and sound blocks in Scratch could be improved. This would help kids make even more creative music.

Trying New Ideas with Scratch Lab

The Scratch Lab is where the Scratch Team tries out new ideas. These are experiments that might become part of the main Scratch website later. Some ideas they are working on include:

  • Video Sprites – Fill your sprites with live video from your camera.
  • Face Sensing – Make games and animations that react to your face.
  • Animated Text – Make words come alive with colors, fonts, and movement.

A World of Scratchers

The MADE Scratch Workshop
A Scratch programming workshop

Scratch is used in many places, like schools, museums, libraries, community centers, and homes. While it's designed for ages 8–16, people of all ages enjoy using it. This wide use has created many communities, both online and in person. In April 2020, Scratch was even listed among the top 20 programming languages in the world.

Learning with Scratch

Scratch is a great first language for learning to code. It's easy to create fun programs quickly. The skills you learn in Scratch can also help you understand other programming languages like Python and Java.

Scratch isn't just for games. You can create animations, stories, music, and art. Teachers use Scratch to make lessons in math, history, and science more visual and interactive. It helps students understand programming logic and how to build things creatively. For example, Scratch is taught in over 800 schools and 70 colleges of the DAV organization. It's also used in the first week of Harvard University's introductory computer science course, CS50.

The Online Community

Jumper platformer
An example of a game created with Scratch 2.0

People who use Scratch are called "Scratchers." They can share their projects on the Scratch website. Other Scratchers can then view, download, and even remix the code. This means they can use parts of a project to create something new. Scratchers can also comment on projects, mark them as favorites, and follow other users. The website often creates "Scratch Design Studio" challenges to encourage creativity and sharing.

There's also a special online community for educators called ScratchEd. Here, teachers share ideas and resources for using Scratch in the classroom.

Scratch Studios

Scratchers can upload their projects to "studios." These are like online galleries where many projects are collected. Other Scratchers can then easily find, view, comment on, and remix projects in a studio. Some Scratchers create studios to keep all their own projects in one place.

Shadow on Scratch
An example of a game created with Scratch 3.0

The Scratch Wiki

The Scratch Wiki is a helpful resource for everything about Scratch. It has information about the website, its history, and how to use it. While the Scratch Team supports it, Scratch users (Scratchers) write most of the articles.

Community Roles

On Scratch, users have different roles shown next to their username. New accounts start as "New Scratchers." This role has a few limits to help keep the community safe and organized. For example, new users might have a short wait time between posting comments. After a while of being active and creating projects, an account can become a regular "Scratcher."

Official moderators and developers are part of the "Scratch Team." They usually have a star next to their username. There are also special accounts for Students and Educators to use Scratch in classrooms.

How Scratch is Built

Scratch is an open-source project. This means its code is available for anyone to see and learn from. The Scratch 3.0 editor uses a special library called Blockly. This library, created by Google, helps make the block-based coding interface.

Fun Events

Scratch Educators often meet in person at "Scratch Educator Meetups." They share ideas and learn from each other about teaching with Scratch.

Every May, there's an annual "Scratch Week" (formerly "Scratch Day"). During this week, people all over the world host events to celebrate Scratch. These events can be big or small, and you can find a list of them on the Scratch Day website.

For April Fools' Day, the Scratch Team sometimes plays fun pranks on users. They might add silly "Easter eggs" or change how some blocks look in projects.

The Story of Scratch

In the early 2000s, a group at the MIT Media Lab called the Lifelong Kindergarten group (LLK) started working on visual programming languages for kids. In 2003, they received a grant to create a new way for children to express themselves with code. The LLK team, led by Mitchel Resnick, worked with youth centers to develop Scratch. They wanted to make a programming language that was easy and fun to use.

The main idea behind Scratch is "Imagine, Program, Share." It encourages users to share their creations and to use (or remix) code from others. Projects made with Scratch are shared under a Creative Commons Attribution-ShareAlike License. This license means others can use and change your work, as long as they give you credit. Scratch automatically credits the original creator on every project page.

Scratch 2.0 was released on May 9, 2013. This update changed the website's look and added both an online and an offline editor. It also introduced new features like custom blocks. Scratch 3.0 was first announced in 2016. After several test versions, the final Scratch 3.0 was released on January 2, 2019. On June 28, 2023, the Scratch website updated its colors. The header and links changed to purple, and new high-contrast block colors were added. This made the site easier for people with colorblindness to use.

In 2013, the Scratch Foundation was created. On March 11, 2019, the Scratch Team became part of this foundation. The MIT Media Lab still works closely with the Scratch Foundation.

The Scratch Foundation

The Scratch Foundation is a company started in 2013. Its job is to manage and support Scratch and ScratchJr. The MIT Media Lab officially transferred Scratch to the Foundation in 2019. You can find their website at Scratchfoundation.org.

Project Files

Scratch projects are saved in special file formats. For example, Scratch 3.0 projects use the *.sb3 file format. Older versions used formats like *.sb for Scratch 1.4 and *.sb2 for Scratch 2.0. These files contain all the code, images, and sounds for your project.

Older Versions of Scratch

Even though the main Scratch website uses Scratch 3.0, you can still find and use older offline editors. The Scratch 2.0 and Scratch 1.4 offline editors are available for download. You can create and run projects with them on your computer. If you upload a Scratch 2.0 project to the main website, it automatically changes to the Scratch 3.0 format. There is also an offline version of Scratch 3.0.

The tools used to build Scratch have changed over time. For example, Scratch 2.0 used Adobe Flash for its online version. Scratch 3.0 uses newer web technologies.

In Scratch 2.0, the stage area was on the left side. The programming blocks were in the middle, and the coding area was on the right. Scratch 2.0 also added a "backpack" feature. This let you easily move scripts, sprites, costumes, and sounds between different projects.

Special Features

Scratch uses a style of programming where things happen based on events. For example, a sprite might move when you click it. Sprites can be drawn using vector graphics or bitmap graphics. You can draw them right in Scratch or import them from other places. Scratch also lets you use "lists" to store information.

Other Scratch-like Tools

  • Snap! is another visual programming language. It was inspired by Scratch but offers more advanced features.
  • ScratchJr was released in 2014 for iPad and later for Android. It's a simpler version of Scratch designed for younger children, usually ages 5 to 7.

Community-Made Improvements

Because Scratch is open source, people in the community can create their own tools to improve it. For example, there are browser extensions like Scratch Addons. These add new features to the Scratch website and editor.

TurboWarp is another tool created by the community. It's a special version of the Scratch 3.0 editor that makes projects run much faster. It can also turn your Scratch projects into standalone files that work outside of Scratch.

Users can also create their own extensions for Scratch 3.0 using JavaScript. While the official Scratch website doesn't allow these unofficial extensions, some modified versions of Scratch do.

See also

Kids robot.svg In Spanish: Scratch (lenguaje de programación) para niños

kids search engine
Scratch (programming language) Facts for Kids. Kiddle Encyclopedia.