Skip to content

The tool’s interface below is still in French.

From blocks to Python and JavaScript

Paste a Scratch script: it is translated into Python or JavaScript, line by line, to show students that text code says the same thing.

Script Scratch

Code texte

Les déplacements du lutin deviennent des commandes du module turtle en Python. En JavaScript, ils sont notés comme des appels à un objet « lutin » à adapter à votre projet. Les blocs sans équivalent direct (sons, costumes, clones) apparaissent en commentaire.

How it works

How to use the blocks to Python and JavaScript converter

Translate a Scratch script into Python or JavaScript, line by line, to support the move to text code.

  1. Paste the script

    As block text, French or English.

  2. Choose the language

    Python or JavaScript.

  3. Copy the code

    Or download the file.

FreeNo subscription, no hidden limits.
No sign-upOpen the page and use the tool. That’s it.
InstantResults in seconds, on mobile too.
PrivateEverything runs in your browser.

About the blocks to Python and JavaScript converter

Variables, loops, conditions, operators, questions and custom blocks have a direct equivalent. Sprite movements become commands of Python’s turtle module.

The code produced is runnable: the player’s input is converted to a number without error, as Scratch does.

scratch to python convert scratch to python scratch to javascript converter block code to text code scratch code converter scratch blocks to python blocks to code
FAQ

Frequently asked questions about the blocks to Python and JavaScript converter

Are all blocks converted?

No: sounds, costumes and clones have no simple equivalent and appear as comments to adapt.

Where do I find the block text?

Write it as in the examples, one block per line, or paste a script shared in scratchblocks format.

Can I use these sheets in class?

Yes, freely and at no cost: the documents you generate are yours, with no account and no watermark.

Esc
↑ ↓ navigateEnter open