Skip to content
hateitall

CSS Playground

Try layouts, states and animations against real markup and watch the result update as you type.

Processed locallyIn: CSS, HTMLOut: Preview

Loading tool…

How to use css playground

  1. Pick a preset such as flexbox, grid, button states or a keyframe animation, or start from your own markup.

  2. Edit the CSS; the preview updates a moment after you stop typing.

  3. Switch the preview to phone or tablet width to test media queries.

  4. Fix any problem the brace and string check reports under the editor.

What this tool does

  • Renders in an isolated frame, so your CSS never leaks into or out of the page around it.
  • Phone (390 px) and tablet (768 px) widths make media queries respond as they would on a device.
  • Checks the CSS for unclosed blocks, stray braces and unclosed strings and shows the line.
  • Remembers your last CSS and HTML in this browser.

How the result is verified

The preview is the browser's own rendering of your CSS, so what you see is the real result. A separate parse checks that every block, string and comment is closed.

Frequently asked questions

Why can I not load a Google Font in the preview?

The preview blocks all network requests so nothing you type can reach another server. Test fonts with system fonts or embed a font as a data URI.

Is my work saved?

Your last CSS and HTML are kept in this browser's local storage and come back when you return. They are not sent anywhere.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Edit HTML, CSS and JavaScript and run them live in a sandbox with a console

HTML · CSS · JavaScript→ PreviewModerate on device

Beautify minified CSS with clean indentation, selectors and media queries

CSS · Text→ CSSLight on device

Smaller CSS with comments, whitespace and empty rules removed safely

CSS→ CSSLight on device

Run JavaScript with a console and top level await, no network access

JavaScript→ ConsoleModerate on device