Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
element.animate() call shows up here as it plays.A live code editor runs HTML, CSS and JavaScript and shows the result as you type. Ours shows the preview beside your code and updates it a moment after you stop typing. If you only change CSS, the preview keeps its current state, so a menu you've opened stays open while you restyle it.
All of our code snippets open in this same editor. To look at a single HTML file, the HTML Viewer is quicker.
console.log output. Select an error to jump to its line.Turn off Auto to run the code only when you press Ctrl+Enter (Cmd+Enter on a Mac).
The editor supports HTML, CSS and JavaScript, plus Markdown, Less, JSX, TypeScript and TSX. To switch, click the language name at the top of a pane. The editor turns your code into plain HTML, CSS or JavaScript before the preview runs, and the Compiled tab shows the result.
You can import npm packages by name, for example import confetti from 'canvas-confetti'. The editor fetches the package for you, so there's nothing to install. Emmet abbreviations such as ul>li*3 expand when you press Tab, and class names from the CSS libraries you add appear as suggestions.
Five tabs under the editor's preview help you find bugs.
Loop protection stops any loop that runs longer than 1.5 seconds, so a mistake can't freeze the tab.
Pick a size from the menu above the editor's preview. Presets run from a 390-pixel phone to a 1440-pixel desktop, and Responsive lets you drag the preview to any width. All three sizes shows phone, tablet and desktop widths side by side.
The ruler above the preview shows the width in pixels and marks each media query breakpoint in your CSS. Open in a new window shows the preview in a separate window that updates as you edit.
Press Ctrl+S to save a project in your browser. Saved projects stay on that device, so use Export all in the Saved panel to copy them to another browser. The editor also saves a draft as you type, and History keeps the last 40 versions of each project in this browser.
Share creates a link with your code stored inside it. When someone opens the link, they see the code and press Run to start it. Export downloads one HTML file, or a ZIP with separate HTML, CSS and JavaScript files.
Yes, the editor is free and needs no account. Saving, sharing and exporting all work without signing in.
Saved projects and drafts are stored in your browser, on the device you used. Clearing your browser data deletes them, so export anything you want to keep.
Yes, switch the JavaScript pane to JSX, TypeScript or TSX, or start from the React template. The editor compiles the code with Babel before the preview runs.
Loop protection in the code editor stops any loop that runs longer than 1.5 seconds. Turn it off in Settings if the loop is meant to run that long.
No, shared links don't expire because the code is stored inside the link. Projects too long for a link can be downloaded as a ZIP instead.
Added to the page’s <head> before your CSS. Use it for meta tags, a <base> tag or a font link.
Click any element to find its code Esc
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
element.animate() call shows up here as it plays.