Viewport Meta Tag Builder

Configure viewport options and instantly get the correct HTML meta viewport tag for your responsive website.

Configure Viewport

0.1 (zoomed out) 5.0 (zoomed in)

Generated Tag

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Quick Presets

Attribute Reference

width
Sets the viewport width. Use device-width for responsive layouts, or a fixed pixel number.
initial-scale
Zoom level when the page first loads. 1.0 means no zoom.
minimum-scale
Smallest zoom level the user can pinch to. Defaults to 0.1 if omitted.
maximum-scale
Largest zoom level the user can pinch to. Defaults to 5.0 if omitted.
user-scalable
Whether the user can zoom. yes (default) or no. Avoid no for accessibility.
Copied!

Summary

Configure viewport options and instantly get the correct HTML meta viewport tag for your responsive website.

How it works

  1. Select the width setting — "device-width" is recommended for responsive sites.
  2. Set the initial-scale value (1.0 = no zoom on first load).
  3. Optionally configure minimum and maximum scale limits.
  4. Toggle the user-scalable option to allow or prevent pinch-zoom.
  5. Copy the generated meta tag and paste it inside your HTML <head> section.

Use cases

  • Add correct viewport settings to a new HTML/CSS project.
  • Prevent mobile browsers from zooming out on page load.
  • Restrict or allow user pinch-to-zoom on mobile interfaces.
  • Generate tags for single-page apps, landing pages, or email templates.
  • Quickly look up the correct attribute names without memorizing the syntax.
  • Test different scale combinations to understand their effect on mobile layout.

Frequently Asked Questions

Last updated: 2026-06-10 · Reviewed by Nham Vu