Test an HTML/CSS block at multiple sizes

Paste an HTML snippet and its associated CSS to instantly check how it renders on mobile, tablet, and desktop, in an isolated sandboxed iframe that cannot execute scripts or access your page.

How it works

The HTML and CSS you enter are assembled into a standalone mini-document, injected into an <iframe> via the srcdoc attribute. This iframe is in "sandbox" mode, meaning it's isolated from the rest of the page: it cannot execute scripts (no <script> is allowed) or access the rest of the site, protecting against any risk of malicious injection from the pasted content. Choose a predefined format (mobile, tablet, desktop) or enter a custom width and height to observe your block's responsive behavior.

Is JavaScript executed in the preview?

No, intentionally: the iframe is sandboxed without the allow-scripts permission, so any <script> in the pasted HTML will be ignored. Only the HTML rendering and CSS application are previewed.

Can I test CSS media queries?

Yes: the @media rules included in your CSS apply normally based on the width defined for the preview (preset or custom value), exactly like in a real resized browser.

Your HTML and CSS are never sent to a server: the rendering is generated entirely in your browser, locally.