Viewport Unit Calculator – Online vw vh vmin vmax to PX
Enter a CSS value in vw/vh and see the actual pixel size at current viewport. Dynamic resize demo.
UD5 Toolkit
Build the perfect responsive viewport meta tag. Supports iOS safe areas, zoom control, and all modern devices.
Free Instant Copy Live Previewwidth=device-width for responsive sitesinitial-scale=1.0 as the defaultuser-scalable=no — it harms accessibility (WCAG)viewport-fit=cover for iPhone X+ notch support<head> before any stylesheetswidth=device-width, initial-scale=1.0, you instruct the browser to match the viewport width to the device's screen width and start at a readable 1:1 scale. This is the foundation of responsive web design and directly impacts user experience and Core Web Vitals scores, which affect SEO rankings.
width=device-width sets the viewport width to equal the CSS pixel width of the device screen at 100% scale. For example, an iPhone 14 has a device-width of 390 CSS pixels, while an iPad Pro may report 1024 CSS pixels. This ensures your CSS media queries and layout calculations reference the actual screen dimensions rather than a generic desktop width. Note: CSS pixels are not the same as physical hardware pixels — modern high-DPI screens use device-pixel-ratios (DPR) of 2x or 3x, meaning one CSS pixel may map to multiple physical pixels for sharper rendering.
initial-scale=1.0 sets the zoom level when the page first loads. A value of 1.0 means no zoom — content displays at its natural size. Values above 1.0 zoom in (making everything larger), while values below 1.0 zoom out. The 1.0 default is recommended because it provides a predictable, readable starting point for users. It also ensures that CSS media queries behave as expected. Setting initial-scale to something other than 1.0 can confuse users and break responsive layouts that rely on accurate viewport width calculations.
user-scalable=no is considered an accessibility violation under WCAG 2.1 Success Criterion 1.4.4 (Resize Text). Many users with visual impairments rely on zoom to read content. While some progressive web apps (PWAs) use it to create app-like experiences, it's discouraged for content websites. If you must restrict zoom for a specific use case (like a kiosk or game), pair it with maximum-scale=1.0 and ensure your text remains legible at the locked scale. Major browsers like Chrome and Safari have even started ignoring user-scalable=no to protect user accessibility.
viewport-fit=cover allows your webpage content to extend into the safe area insets of devices with notches, rounded corners, or home indicator bars (iPhone X and later). Without it, Safari adds letterboxing bars around your content to keep it within a rectangular safe zone. Use viewport-fit=cover when you want full edge-to-edge designs and are prepared to handle safe areas with CSS env(safe-area-inset-*) variables. This is essential for modern iOS web apps that aim for a native feel.
shrink-to-fit=no was introduced in iOS 9 to prevent Safari from shrinking content when it overflowed the viewport. It's similar to overflow: hidden on the body element. While less commonly needed today (modern responsive layouts rarely overflow), it can still be useful for specific layouts where you want horizontal scrollbars instead of automatic shrinking. For most modern responsive websites, this attribute is optional and can be omitted.
navigator.userAgent or screen dimensions. This is rarely necessary; a single well-configured viewport tag combined with responsive CSS media queries handles virtually all devices. For edge cases (like separate mobile/desktop sites), server-side rendering can conditionally include different viewport tags.
<head> section of your HTML document, ideally before any stylesheets or scripts. This ensures the browser applies the viewport settings before parsing CSS, preventing layout shifts and re-renders. It should be one of the first elements in <head>, right after the charset declaration. Example order: <meta charset="UTF-8"> → <meta name="viewport" ...> → <title> → <link rel="stylesheet">.
Enter a CSS value in vw/vh and see the actual pixel size at current viewport. Dynamic resize demo.
Create a random superhero with a unique name, power, weakness, and origin story. Fun creative writing prompt. All frontend.
Select your OS, IDE, and programming language to generate a complete .gitignore file. No typing required.
Design a crystal grid by placing crystals on a sacred geometry template. Add notes. Screenshot your layout. Spiritual/art.
Find out how large you can print based on image resolution in pixels. Understand DPI and megapixels.
Understand how !important behaves inside @layer vs unlayered styles. Interactive example. Avoid common pitfalls.
Find the optimal TV size for your room or the best viewing distance based on screen size and resolution (1080p, 4K, 8K). Simple THX/SMPTE reference.
Calculate grout needed (lbs or kg) based on tile size, grout joint, and area. Also recommend spacer size. Local estimator.
Input camera sensor, focal length, aperture, distance to get hyperfocal distance and DoF range. Visual chart.
Calculate how many planks you need to cover an area given plank dimensions and gap. Quick carpentry estimator. Local only.
Convert diopter strength to approximate magnification and working distance for macro photography.
Calculate projector throw distance or screen image size based on throw ratio. Visualize setup. Essential for home theater planning. Local.
Calculate how many vegetable plants fit in a given area using square foot gardening or row spacing. Visual plant grid. Plan your spring garden.
A 10‑band graphic equalizer applied to any audio file or mic input. Save presets. All processing via Web Audio API.
Type a line and see syllable count as you write. Generate nature-themed prompts. Poetry aid.
An on‑screen ruler that measures in pixels, centimeters, and inches. Drag to resize. Handy for UI designers and developers.
Create and dispatch custom events with detail. Listen on other elements. Understand pub/sub pattern in vanilla JS.
Calculate antenna element lengths for a given frequency (or vice versa). Supports 1/4 wave, 1/2 wave, dipole. Useful for ham radio. Local only.
Quick reference for frequently used Git commands with examples. Searchable and categorized. A handy resource for all developers.
Simulate rolling dice for board games, RPGs, and decision making. Choose number of dice and faces. Fun, lightweight, and no download required.
Enter a package name and version range to see all satisfying versions from the registry. Understand ^ and ~.
Rotate a 3D cube on your phone using the Gyroscope API. See angular velocity around each axis. Amazing sensor demo.
Calculate how long it will take to pay off credit card debt with fixed monthly payments or a payoff goal. Understand interest costs fully.
Estimate how much agricultural lime or elemental sulfur to add to change soil pH by a target amount. Based on soil type and current pH. Educational.
See a live VU meter of your microphone's input level. Test if your mic is working and adjust gain. Privacy‑friendly.
Calculate corrected (adjusted) age for premature infants based on birth date and due date. Important for developmental milestone tracking. Local only.
Calculate how much pure ammonia to add to reach 4ppm for a fishless cycle. Safe start guide.
Calculate the output voltage and resistor values for a voltage divider circuit. Includes schematic. Handy for electronics hobbyists and engineers.
Generate a realistic‑sounding exoplanet designation (e.g., Kepler‑442b) and a sci‑fi planet description. For worldbuilding.
Calculate how much water to change weekly to keep nitrates under control. Based on current nitrate level, desired level, and tank volume.