How to use
- Paste your markup into the HTML box and your styles into the CSS box. It opens with a sample that contains a banner that overflows on narrow screens.
- Tick the screen widths to preview. By default that is 320, 375, 768, 1024 and 1440 px, and Custom lets you enter any width and height.
- The frames sit side by side. If the large ones do not fit on one row, scroll sideways. View scale (100%, 75%, 50%, 33%) shrinks them for an overview.
- Rotate above a frame swaps its width and height, and Rotate all does it for every frame at once.
There is no way to load a site by URL. Other sites often refuse to be embedded or are blocked by security policy, so this tool only works with the HTML and CSS you paste.
Default widths
| Width | Frame height | After rotating | Typical use |
|---|---|---|---|
| 320 px | 568 px | 568 x 320 | small phone |
| 375 px | 667 px | 667 x 375 | regular phone |
| 768 px | 1,024 px | 1,024 x 768 | tablet portrait |
| 1,024 px | 768 px | 768 x 1,024 | tablet landscape, small laptop |
| 1,440 px | 900 px | 900 x 1,440 | desktop |
Custom sizes accept 200 to 3,000 px for both width and height. A frame’s width is its browser window width, so @media (max-width: ...), vw and vh all work against that size. Rotating swaps width and height, which lets you check @media (orientation: landscape) too.
Horizontal overflow detection
Each frame measures its own scrollWidth and clientWidth and reports them. If the content is more than 1 px wider than the screen, a horizontal scrollbar would appear: the frame border turns red and the number of overflowing pixels is shown.
Up to three likely causes are listed too. Elements whose right edge sticks out of the screen are shown as tag, id, class and the overshoot, for example div.banner (+176px). Elements inside an overflow: auto or hidden container and position: fixed elements are skipped because they do not widen the page. Fixed-width elements like .banner { width: 480px; } in the sample, long unbroken strings, and images or tables with set widths are the usual culprits.
A missing <meta name="viewport"> is reported. Without it, real phone browsers lay a page out at about 980 px and then shrink it to fit, while this preview lays it out at exactly the chosen width.
Media query breakpoints
The min-width and max-width values inside @media rules are found and shown as buttons, with em and rem converted at 16 px. Pressing one sets the custom width to that value so you can check just above and below the breakpoint. The sample CSS yields 480 px and 1,024 px.
JavaScript is blocked by default
Frames are separated from this page by sandbox, and every request that leaves the browser (images, fonts, fetch, form posts) is blocked. <script> does not run by default and only the measuring script is allowed, so the tool is meant for checking static HTML and CSS layouts. For pages whose layout changes through scripts, such as a hamburger menu, turn on Allow JavaScript. External requests stay blocked even then, so CDN libraries and external images will not load.
How it differs from a real device
- It renders with this browser’s engine. The iOS Safari address bar, bottom bar, safe areas (notch) and text size adjustment are not reproduced.
- Input environments such as touch, hover and the soft keyboard are not imitated.
- Frame scrollbars are hidden so the full width is used like on a real phone. Vertical scrolling still works with the wheel or touch.
Frequently asked questions
Can I enter a site address?
No. Most sites refuse to be placed inside another page, and this site’s security policy also blocks loading external pages as frames. Paste the HTML and CSS of the screen you want to check.
My media query does not apply.
Queries run against the frame width, so check the width condition in your CSS. Use the breakpoint buttons to try the exact value. External CSS files (<link>) cannot be loaded, so paste the CSS into the CSS box.
There is overflow but no cause is listed.
Elements inside a container clipped by overflow: hidden and fixed elements are left out. Candidates are also limited to three and compare only the right edge of the screen, so when nothing shows up, draw an outline on the suspect elements and look.
Is it identical to a real phone?
It is meant for checking how the layout folds. For browser differences between devices, check once more on a real device or in your developer tools’ device mode.
Related tools: HTML CSS JS Playground, HTML to Image, HTML Validator, HTML Beautifier & Minifier, CSS Beautifier & Minifier, CSS Flexbox & Grid Generator.
Your HTML and CSS are processed in this browser and never sent to a server.