Responsive Design Tester

Preview responsive layouts at common mobile, tablet, and desktop widths without uploading your HTML or CSS.

Last reviewed: June 2026

New to this tool? Click here for instructions

Paste your HTML
Paste HTML above and select a device to preview your layout.

How to Use the Responsive Design Tester

Paste a complete HTML document or a focused component snippet into the editor, then choose Device, Custom, or Side-by-Side mode. Device mode previews one common phone, tablet, laptop, or desktop viewport. Custom mode lets you enter an exact width and height. Side-by-Side mode renders mobile, tablet, and desktop frames at the same time for quick layout comparison.

The Scale to fit control only changes how the preview frame is displayed on your screen. The iframe still receives the selected viewport width and height, so media queries are evaluated against the intended test size.

When to Use the Tool in Real Workflows

This tester is useful before committing a component, sharing a bug report, or checking a small landing-page section without opening a full local dev environment. Paste the HTML and inline CSS for the component, switch between common widths, and watch for wrapping, overflow, clipped buttons, or grids that collapse too late.

For final QA, still test the real page in browser DevTools and on actual devices. This page is a fast local preview surface, not a replacement for a full rendering matrix with browser zoom, device pixel ratio, network conditions, and real font loading.

How It Works

The preview uses an iframe with srcdoc. Your pasted HTML is assigned directly to that iframe in the current page, so the markup is not uploaded to ThisDevTool and no backend service formats or renders it. The sandbox allows scripts, same-origin behavior, and forms so interactive snippets can still run in a constrained preview frame.

Tips, Edge Cases, and Limitations

Live websites usually cannot be previewed by URL because many sites block embedding with security headers such as X-Frame-Options or Content Security Policy. Paste the HTML you control instead. If your snippet depends on external assets, make sure those URLs are reachable and allowed by the remote host.

Responsive CSS is usually easier to evaluate when your base styles are mobile-first and larger layouts are added with @media (min-width: ...) rules. Watch for content width, line length, touch-target size, table overflow, and button text wrapping at every breakpoint.

Sources Checked

Reference behavior was checked against MDN documentation for the iframe element, CSS media queries, and MDN's responsive design guide.

Frequently Asked Questions

Most modern websites block iframe embedding due to security reasons. For testing live sites, use your browser's built-in DevTools (F12 > Device Toolbar).
Common breakpoints include 320-375px (small to medium phones), 768px (tablets in portrait mode), and 1024px (tablets in landscape, small laptops).
Viewport width refers to the size of the browser window, while screen width refers to the physical size of the device's display.
Mobile-first design involves writing base CSS for mobile screens and then adding @media (min-width: ...) queries to enhance the layout for larger screens.
Open Chrome DevTools (F12), go to the 'Device Mode' tab, and select the device you want to test. You can also use the 'Toggle Device Mode' button to switch between different devices.

Quick reference

Responsive tester viewport reference
Test targetUseful widthsWhat to inspect
Small phones320px to 390pxButton labels, form fields, navigation wrapping, and horizontal overflow.
Large phones390px to 430pxHero copy, card stacks, image aspect ratios, and sticky controls.
Tablets768px to 1024pxTwo-column layouts, sidebars, tables, and touch-friendly spacing.
Desktop1280px and widerMaximum content width, grid density, line length, and unused whitespace.