CSS Playground
Prototype HTML and CSS live in a sandboxed, script-free preview with desktop, tablet, and mobile viewports.
Related design tools
All Design toolsAbout CSS Playground
Write and test HTML and CSS side by side in a strictly sandboxed, script-free live preview with desktop, tablet, and mobile viewport toggles and standalone HTML export.
How to use CSS Playground
- 1
Start with a built-in UI template (Pricing Card or Flexbox Navbar) or paste your own HTML and CSS.
- 2
Edit either pane to see the sandboxed preview update live without leaving the page.
- 3
Switch between desktop, tablet (768px), and mobile (375px) preview widths, then copy your CSS or export a standalone HTML file.
Frequently asked questions
Is the CSS Playground preview safe for untrusted snippets?
Yes. The preview renders inside an iframe with an empty sandbox="" attribute and strips <script> tags so JavaScript cannot execute.
Can I test media queries inside the playground?
Yes. Switching between Full, Tablet (768px), and Mobile (375px) resizes the preview iframe so CSS media queries trigger accurately.
Does the playground save or upload my code?
No. Your HTML and CSS stay purely in local browser memory until you copy or download them.
