ArticleslgStudy

computer science

Blockly

Blockly is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Blockly rather than just read about it. In short: Blockly is a client-side library for the programming language JavaScript for creating block-based visual programming languages (VPLs) and editors. A project of Google, it is free and open-source software released under the Apache License 2.0.

Blockly — main illustration
Blockly — illustration

Key takeaways

  • Blockly belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Blockly to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Blockly from memory before moving on to harder problems.

Reference excerpt

Blockly is a client-side library for the programming language JavaScript for creating block-based visual programming languages (VPLs) and editors. A project of Google, it is free and open-source software released under the Apache License 2.0. It typically runs in a web browser. Blockly uses visual blocks that help simplify programming, and can generate code in JavaScript, Lua, Dart, Python, or PHP.

History Blockly development began in summer 2011. In October 2025, the Raspberry Pi Foundation announced that from 10 November 2025, the Blockly open source library and assets, and key members of the Blockly team will transition from Google to the Raspberry Pi Foundation.

User interface

The default graphical user interface (GUI) of the Blockly editor consists of a toolbox, which holds available blocks users can select from, and a workspace, where users can drag and drop blocks to place and rearrange them. The workspace also includes zoom icons and a trash can to delete blocks. The editor can be modified easily to customize and limit the available editing features and blocks.

Customization Blockly includes a set of visual blocks for common operations, and can be customized by adding more blocks. New blocks require a block definition and a generator. The definition describes the block's appearance (user interface) and the generator describes the block's translation to executable code. Definitions and generators can be written in JavaScript, or using a visual set of blocks, the Block Factory, which allows new blocks to be described using extant visual blocks; the intent is to make creating new blocks easier.

Applications Blockly is used in several notable projects, including:

MIT's Scratch (since version 3.0), visual programming environment for education MIT's App Inventor, to create applications for Android. Code.org Microsoft's MakeCode PICAXE, to control their educational microchips

Features Web-based using Scalable Vector Graphics (SVG) Completely client-side JavaScript Support of major web browsers Support for many programmatic constructs including variables, functions, arrays Minimal type checking supported, designed for dynamically typed languages Step-by-step code execution for tracing and debugging code Localised into 100+ languages Support for left-to-right and right-to-left languages

Transition to the Raspberry Pi Foundation On 28 October 2025, Google announced that Blockly, along with key members of its development team, would move from Google to the Raspberry Pi Foundation on 10 November 2025, after being developed within Google for 12 years. Google stated the move was supported by a grant from Google.org and would not require existing projects using Blockly to make any changes, with the library remaining free and open source under its existing Apache License 2.0. Following the transition, the Raspberry Pi Foundation stated its intention for Blockly to remain the standard visual-programming interface for accessible coding, and announced plans to roll out accessibility improvements over the following year, including screen reader support and keyboard navigation, in partnership with platforms that use Blockly.

References

External links

Official website

Illustrations

Blockly: Example of Blockly code with a while loop
Example of Blockly code with a while loop

Worked examples

Example 1 — a first encounter with Blockly

Start with the simplest possible case. Write down what Blockly claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Blockly before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Blockly ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Blockly

In research
Blockly appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Blockly in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Blockly is common in secondary-school and first-year university syllabi. It links to neighbouring topics Block-based visual programming languages, Free software programmed in JavaScript, Google software, so understanding it makes those chapters shorter.
In everyday life
Look for Blockly outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Blockly” →

How to study Blockly in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Blockly means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Blockly out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Blockly in simple terms?

Blockly is a client-side library for the programming language JavaScript for creating block-based visual programming languages (VPLs) and editors. A project of Google, it is free and open-source software released under the Apache License 2.0.

Why does Blockly matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Blockly?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Blockly.

Tags

  • Block-based visual programming languages
  • Free software programmed in JavaScript
  • Google software
  • JavaScript libraries
  • Software using the Apache license

Keep exploring