HTML, CSS & JavaScript Runner

Build and run HTML, CSS and JavaScript together in one online playground with live preview and console. Sandboxed, private, and runs fully in your browser. Free.

What Is an Online Code Playground?

A code playground is a browser workspace that turns three separate files into one running page instantly. Markup describes the structure, CSS describes the appearance, JavaScript describes the behaviour, and the playground handles the plumbing so you can focus on the idea rather than the setup.

This matters because the cost of trying something should be near zero. When an experiment requires a project folder, a package install and a dev server, most small ideas never get tested. When it requires one keystroke, they do.

How Your Files Are Assembled

On each run the playground builds a complete HTML document: a doctype, a UTF-8 charset, a responsive viewport meta tag, your CSS inside a <style> element in the head, your markup in the body, and your JavaScript as a module script placed after the markup. Because the script comes last and runs as a module, the DOM is already parsed — no readiness listener required.

Security Model

The generated document is handed to an iframe whose sandbox permits scripts, forms, modals and popups but not allow-same-origin. That single omission gives the frame an opaque origin, which is what stops user code from reaching the surrounding application. It cannot read our DOM, cookies or storage, and it cannot invoke privileged APIs in our origin.

Console messages travel back over postMessage and are validated against the frame's window before display, so nothing else on the page can inject fake output into your console.

Everything in the Toolbar

  • Run and Stop: execute the project, or unload the sandbox to kill a runaway script.
  • Reset: restore the demo project and clear the saved draft.
  • Format: reindent the active file with Prettier, loaded on demand.
  • Copy and Download: move the active file to your clipboard or disk.
  • Import: load an existing file from your device into the active tab.
  • Fullscreen: expand the workspace when a layout needs room.
  • Resizable split: drag the divider to favour the editor or the preview.

Ideal Use Cases

Prototyping a component's markup and interaction before porting it to React or Vue. Teaching the relationship between HTML, CSS and events in one screen. Reproducing a bug in isolation so a colleague can see it immediately. Testing an accessibility pattern such as a disclosure widget with keyboard support. Practising DOM APIs — event delegation, dataset, classList, IntersectionObserver — with visible results.

Where a Playground Stops

Anything that needs a build pipeline, environment variables, package resolution, routing or a server belongs in a real project. Being honest about that boundary is the point: this tool does the small work extremely well and does not pretend to replace your toolchain.

Privacy

All three files stay on your device. Rendering, formatting and drafting happen in the browser, and no code, output or asset is uploaded to Zubac Tools.

Focus on one language with the HTML Runner or CSS Runner, or add static typing in the TypeScript Runner.

Related free tools

  • XML Formatter & Minifier — Beautify or minify any XML — SOAP, RSS, SVG, sitemap. Browser-based parser.
  • XML to JSON Converter — Parse any well-formed XML into a clean JSON tree with attributes and arrays.
  • JSON to XML Converter — Convert JSON to well-formed XML — supports attributes, custom root, declaration.
  • CSV Viewer — Open CSV or TSV files in your browser — sort, search, paginate, export filtered view.
  • JSON to CSV Converter — Convert JSON data to CSV format. Export to spreadsheets easily.
  • CSV to JSON Converter — Convert CSV data to JSON format. Useful for API development.
  • JSON Formatter — Format, beautify, or minify JSON with customizable indentation.
  • JSON Validator — Validate JSON syntax and find errors with line and column numbers.
  • HTML Minifier — Compress HTML by removing comments, whitespace, and line breaks.
  • CSS Minifier — Minify CSS by stripping comments, whitespace, and unnecessary characters.
  • JavaScript Minifier — Compress JavaScript by removing comments, whitespace, and empty lines.
  • Base64 Encoder/Decoder — Encode text to Base64 or decode Base64 back to text. UTF-8 support.

Browse all free tools · Guides and tutorials · PDF tools · Developer tools · Text tools · SEO tools