Why sandpage
Multi-File Editor & Local Files
Organize code into projects and folders, edit Python with syntax highlighting and tabs, upload assets (images, audio, data), and keep your work saved locally across reloads and restarts.
Live pygame Graphics & Sound (plus turtle)
Build interactive 2D games, simulations, sprites, and procedural or file-based audio with pygame (pygame-ce), plus a built-in turtle module rendered on top of pygame.
Interactive REPL & Console
Test ideas live in a persistent Python REPL (>>>) that shares your files, canvas, and audio — while staying isolated from your editor script globals.
100% Local & Private (Optional Cloud Sync)
Every keystroke, file, and line of Python runs strictly inside your browser. Nothing is uploaded or loaded from external sync services unless you explicitly opt in under Settings → Cloud Sync Settings….
Keep in mind: Browsers isolate local storage by URL/origin. Opening sandpage from a different URL (or another browser/device) starts with a separate storage space. Use Project → Export (.tar.gz) or opt in to Settings → Cloud Sync Settings… (Google Drive) to keep your projects synced across devices.
The Four Panes (Drag Gutters to Resize)
1. File Explorer & Editor (Top-Left)
Browse projects and folders, edit open tabs, and click Run Code to execute the active .py file in a fresh namespace (clicking Run Code while something is already running stops it and runs the active tab). Click Stop to halt audio and scripts — even infinite loops like while True: pass.
2. Pygame-CE Canvas (Top-Right)
Live graphical output for both Editor scripts (pygame & turtle) and REPL commands, with mouse, touch, and keyboard input. Double-click or click Fullscreen to expand.
3. Interactive Python REPL (Bottom-Left)
Persistent >>> prompt with Tab indentation and ↑/↓ command history. Runs in its own isolated ephemeral /workspace and /tmp sandbox (separate from your projects, not persisted across reloads), while sharing canvas and audio; locked while an Editor script is running.
4. Interpreter Output (Bottom-Right)
Shows stdout, stderr, ANSI colors, and inline input() prompts. Click anywhere in the console to re-focus an active input() box.
Core Concepts
- Projects: Isolated project directories. The Active project is mounted as your Python working directory (
/workspace) and import path, with a read-only root filesystem (/) and an isolated ephemeral /tmp (enable Keep /tmp across runs in the project menu to keep a project's /tmp for the current session; the setting persists across reloads while /tmp contents remain session-only, and unchecking wipes it). Built-in [examples] is read-only and includes fountain.py (with nozzle.png), cube.py, grapher.py, tree.py, and tetris_theme.py.
- Files & Folders: Use the
⋮ context menus to create files/folders, delete items, upload files or whole directories, or export .tar.gz archives. Files written by Python sync back automatically.
- Profiles: Isolated workspace profiles managed in Settings → Profiles (or selected via
?profile=<name-or-id>; unknown or invalid profile URLs refuse to load). Each profile has an immutable ID (e.g. id.default, id.<hex>) and a freely renameable display name (letters, digits, spaces, -, _; no dots). Reopening the root URL restores your last active profile, and switching profiles releases any active sync token and restarts the REPL and Python sandbox completely fresh.
- Cloud Sync (Opt-in, Per-Profile): Local browser storage is always active. Each profile independently chooses whether to sync with at most one external service (such as Google Drive
appDataFolder) from Settings → Cloud Sync Settings… or the bottom status bar. Zero OAuth tokens or personal data are ever stored in localStorage (runtime tokens stay in tab-only sessionStorage and are released on profile switch). By default, Auto-reconnect on startup is off (click Reconnect in the status bar or Settings → Cloud Sync after reopening); enable it per profile to open the sign-in dialog automatically on startup (your browser may require allowing popups for this site). File and profile-name divergences are resolved interactively in a single batch conflict dialog with inline diffing.
- Layout, Edit Menu & Theme: Use Edit → Cut / Copy / Paste / Find (
Ctrl-F) / Find & Replace (Ctrl-H) while the editor is focused (items disable automatically when the editor is unfocused, nothing is selected, or a read-only example is open), toggle optional global editor add-ons under Settings → Editor (off by default, lazy-loaded, not synced to cloud: Toggle Comments Ctrl-/, Match & Auto-Close Brackets, Highlight Active Line, Code Folding), toggle panes, switch System / Dark / Light theme, maximize any pane (⛶), or reset all state from the toolbar.
Source code: https://gitlab.com/DavidDecotigny/sandpage
· Contributing
· Privacy Policy
· Terms of Service
· License (GPLv3)
Powered by Pyodide v0.29.5 (MPL-2.0), pygame-ce 2.5.6.dev2 (LGPL-2.1-or-later), Python stdlib (PSF), and CodeMirror 5.65.16 (MIT) in an isolated Web Worker.
Copyright © 2026 David Decotigny. Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later); comes with ABSOLUTELY NO WARRANTY.
Build: v0.9.2-6-g8ca9660 (8ca9660)