About OnlineCodeEditor
OnlineCodeEditor is a browser IDE for frontend developers, students, interviewers and writers who want to open, edit, run and export a small project in seconds, without an account and without sending code to a server.
Architecture
The site is a static Next.js export. There are no API routes, no database and no remote execution service. Everything that touches your code runs in your browser:
- Editing: CodeMirror 6 with language support for HTML, CSS, JavaScript, TypeScript, JSON, Markdown, Python, SQL, XML, YAML, Java, Rust, Go, C/C++ and PHP.
- Analysis and formatting: a first-party Web Worker parses code (Sucrase and Acorn), lints it, formats it with Prettier and bundles projects. User code is treated as data there and never executed.
- Execution: previews render in an iframe sandbox without
allow-same-origin. Scripts and tests run in a Worker created inside another sandboxed frame. Python (Pyodide) and SQLite (sql.js) run in a third sandbox. Each has its own Content Security Policy; previews have no network access by default. - Storage: projects and snapshots are kept in IndexedDB. If storage is unavailable the editor keeps working in memory and tells you to export.
Honest limits
Some things a cloud IDE can do are not possible here, and the interface says so with labels: there is no TypeScript type checking, no npm installation, no Node.js APIs, no Java/Rust/Go/C++ compilation and no minimap yet. Python has no pip, sockets or input(). Lint rules are an independent ESLint-style subset, not ESLint.
Open-source components
CodeMirror (MIT), Prettier (MIT), Sucrase (MIT), Acorn (MIT), Terser (BSD-2-Clause), fflate (MIT), marked (MIT), DOMPurify (Apache-2.0 / MPL-2.0), yaml (ISC), sql-formatter (MIT), sql.js (MIT), Pyodide (MPL-2.0), React 18 (MIT), IBM Plex and Bricolage Grotesque fonts (SIL OFL 1.1).