DevToolPal
EN

HTML, CSS & JS Playground

Write HTML, CSS and JavaScript and see the result instantly, with a console, share links and HTML download. Runs in a sandbox in your browser.

Runs locally, never uploaded

Code

Preview

Code runs in a sandboxed frame on this page. It cannot read this site or your other tabs.

Console

console.log() output and errors appear here.

    What it does

    This playground is a small online code editor for front-end experiments. Write HTML, CSS and JavaScript in three syntax-highlighted tabs and the preview updates as you type, like CodePen or JSFiddle but without an account. A built-in console shows console.log() output and errors with the line number in your JavaScript, so you can debug without opening developer tools. That makes it handy on a phone or a borrowed computer.

    Use it to try a CSS layout, reproduce a bug for a colleague, test a snippet from Stack Overflow, teach a beginner, or sketch a quick prototype.

    How to use

    1. Type in the HTML, CSS and JS tabs, or press Sample to start from a small counter demo. A dot on a tab means it contains code.
    2. The preview runs automatically 0.6 seconds after you stop typing. Turn off Auto-run for heavy scripts and press Run or Ctrl+Enter when you are ready.
    3. Watch the Console for logs, warnings and errors; the newest line is always at the top. Objects, arrays, Maps, Sets and DOM elements are shown in a compact, readable form.
    4. Share to send the code to someone. Download ZIP saves index.html, style.css and script.js as separate files ready for a real project; Download HTML saves everything as one index.html file that opens in any browser.

    Your code is kept in this browser, so it is still there when you come back. The Tab key indents with two spaces.

    Example

    HTML:

    <button id="go">Click me</button>

    JavaScript:

    document.querySelector('#go').addEventListener('click', () => {
      console.log('clicked at', new Date().toLocaleTimeString())
    })

    Each click adds a line to the console. If you misspell a name, the console shows a red ReferenceError with the line in the JS tab where it happened.

    How it works

    The three panes are combined into one HTML document and loaded into an iframe with the sandbox attribute, so the code cannot read this site’s cookies or storage. A tiny script added to the frame forwards console calls and uncaught errors to the page, and nothing leaves your device.

    FAQ

    › Is my code uploaded or saved on a server?

    No. The code runs in your browser and is saved only in this browser's local storage so it is still there next time. A share link carries the code inside the link itself; nothing is stored on a server.

    › Is it safe to run code here?

    The preview runs in a sandboxed iframe without access to this site, its storage or your other tabs. Scripts can still do anything a normal web page can, such as show alerts or request other websites, so only run code you understand.

    › Can I use npm packages or libraries?

    Yes, add a script or stylesheet tag from a CDN such as cdnjs, jsDelivr or unpkg to the HTML pane, for example a script tag pointing to a library's .min.js file. Plain ES modules work with script type="module" and full CDN URLs.

    › Can I paste a complete HTML page?

    Yes. If the HTML pane contains a full document with doctype, html, head or body tags, your CSS is added to its head and your JavaScript before the closing body tag.

    › How do share links work?

    The Share button above the tool puts all three panes into the link after the # sign. Anyone who opens it sees the same code. Long programs make long links, so use Download ZIP or Download HTML for large projects.