Mobile Viewport Simulator
Explore device viewport dimensions, CSS unit calculations, and breakpoints for iOS and Android devices.
Select Device
iPhone 15 Pro
CSS Unit Calculator
Common Breakpoints
| Framework | xs | sm | md | lg | xl | 2xl |
|---|
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.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
CSS Specificity Calculator
Calculate CSS selector specificity as (inline, ID, class, element) notation. Compare two selectors to see which wins the cascade. Supports :not(), :is(), :has(), :where(), attribute selectors, and pseudo-elements.
Open free tool →
CSS Clip-Path Generator
Generate CSS clip-path values visually. Choose from 16 polygon presets (triangle, star, arrow, hexagon), circle, ellipse, and inset shapes. Live preview, one-click copy. Free, no signup.
Open free tool →
Axios Interceptor Builder
Build Axios interceptor configurations visually. Add auth token injection, automatic token refresh, retry with exponential backoff, and global error handling. TypeScript ready.
Open free tool →
More Free Tools
Related Articles
Capacitor 6: Web-to-Native Bridge for Modern Web Apps
Capacitor 6 lets you build native iOS and Android apps from web code. Learn about the plugin API, native bridge architecture, VS Code extension, and when to choose Capacitor over React Native or Flutter.
Expo SDK 52: Universal Apps with Native Modules
Expo SDK 52 brings React Native New Architecture as default, Expo Modules API, DOM Components, and React Native DevTools integration. Build universal apps with native modules the modern way.
React Native 0.74+ New Architecture: Bridgeless Mode & JSI Deep Dive
Explore React Native's New Architecture in 0.74 and beyond. Learn how Bridgeless Mode, JSI, TurboModules, and Fabric renderer eliminate the legacy bridge bottleneck and transform app performance.
Flutter vs React Native 2026: Complete Cross-Platform Comparison
An in-depth comparison of Flutter and React Native for cross-platform mobile development in 2026. Performance, ecosystem, hiring market, code examples, and when to choose each framework.
Flutter vs React Native vs Kotlin Multiplatform 2026: Which Should You Choose?
Deep comparison of Flutter, React Native, and Kotlin Multiplatform in 2026. Performance benchmarks, developer experience, ecosystem, hot reload, native modules, and real code examples to help you pick the right cross-platform framework.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$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.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →