Skip to main content

Mobile Viewport Simulator

Explore device viewport dimensions, CSS unit calculations, and breakpoints for iOS and Android devices.

✓ 20+ real devices ✓ CSS unit calculator ✓ vw/vh/svh/dvh/rem

Select Device

iPhone 15 Pro

CSS Unit Calculator

Common Breakpoints

Framework xs sm md lg xl 2xl
Current device width fits:

Frequently Asked Questions

What is a CSS viewport unit (vw, vh)?▼

vw (viewport width) and vh (viewport height) are relative CSS units. 1vw = 1% of the viewport width, 1vh = 1% of the viewport height. On a 375px wide phone, 100vw = 375px and 50vw = 187.5px. These units are useful for full-screen layouts but have quirks — on mobile, 100vh includes the browser toolbar height, which iOS Safari addresses with svh/lvh/dvh units.

What are svh, lvh, and dvh?▼

These are new viewport units that account for mobile browser toolbars: svh (small viewport height) = height when all browser UI is visible (most conservative). lvh (large viewport height) = height when all browser UI is hidden. dvh (dynamic viewport height) = adjusts dynamically as the browser toolbar shows/hides. Use dvh for most mobile full-height layouts, svh for the safest minimum.

What is the CSS device-pixel-ratio?▼

Device pixel ratio (DPR) is the ratio of physical pixels to CSS pixels. iPhone 15: DPR 3 (460×1000 physical, ~390×844 CSS). Most Android flagships: DPR 2-3. Standard desktop: DPR 1. In CSS, use @media (-webkit-device-pixel-ratio: 2) or @media (resolution: 2dppx) to target high-DPI screens. In JS, use window.devicePixelRatio.

What is the safe area inset for iOS?▼

iOS devices with notches/dynamic islands have safe area insets that your content should avoid. Use env(safe-area-inset-top/right/bottom/left) in CSS to add appropriate padding. Set the viewport meta tag to: content='width=device-width, initial-scale=1, viewport-fit=cover' to enable safe area support.

What viewport meta tag should I use?▼

The recommended viewport meta tag is: <meta name='viewport' content='width=device-width, initial-scale=1'>. This sets the viewport width to the device width and prevents the browser from zooming in on load. For PWAs that should not be user-scalable: add 'user-scalable=no', though this hurts accessibility. Never omit the viewport meta tag on mobile-targeted sites.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →