Monaco Editor

A code editor with syntax highlighting, bracket matching and formatting. Monaco is large, so it is fetched from a CDN the first time you press Enable Monaco; if that is unavailable the plain text area below still works.

Plain editor
0 lines · 0 chars

About this tool

A scratchpad built on the Monaco editor — the same editor that powers Visual Studio Code — with syntax highlighting, bracket matching, code folding and a formatter for the languages that ship one. Choose a language from the list and write or paste code. Monaco is a large bundle, so it is fetched from a CDN only when you press Enable Monaco; until then, and if the fetch fails, the page uses a plain text area with the same copy, download and clear actions. Nothing you type is ever sent anywhere.

Questions

Why does the editor not appear straight away?
Monaco is several megabytes, so loading it on every visit would slow the page down for people who only want a quick text box. It is fetched on demand when you press Enable Monaco. Until then a plain text area is used, and it keeps working if the fetch fails.
Is my code uploaded?
No. The editor runs entirely in your browser and nothing is sent to a server. The only network request is the one that fetches the editor itself from a CDN, and that request contains none of your text.
Which languages have a formatter?
Monaco ships formatters for a handful of languages such as JavaScript, TypeScript, JSON, HTML and CSS. For languages without one the Format button reports that no formatter is available rather than changing your text.
Does it work offline?
The plain text area does. Monaco itself needs one successful download the first time; after that your browser may keep it in its cache, but a hard refresh while offline falls back to the text area.
Where did my text go when I pressed Clear?
It is gone from the page — Clear empties the editor and the text area together. The editor keeps no copy, so there is nothing to recover afterwards.