Responsive Font Sizes on Mobile

The vw formula for each mobile base width, and how clamp() handles both screen size and the user's font settings.

Font size is one of the trickiest parts of the mobile web. Text that looks right on a 360px screen feels relatively small on a 430–440px iPhone Pro Max, and a size chosen for a wide screen ends up too small on a narrow one. This guide covers the vw-based font calculation used in production, and how clamp() with rem mixed in handles both screen size and the user's font settings.

1. Pick a base width

The first decision when converting a mobile mockup is which width counts as 100vw. The base width should match the width of the mockup (artboard). CSS widths of common devices:

Device CSS width
Galaxy S base models and many other Android phones 360px
iPhone SE (2nd/3rd gen), X, XS, 11 Pro, 12/13 mini 375px
Galaxy S Plus and Ultra 384–412px (varies by model and resolution setting)
iPhone 12, 13, 14, 16e 390px
iPhone 14 Pro, 15, 15 Pro, 16 393px
iPhone 16 Pro, 17, 17 Pro 402px
iPhone Air 420px
iPhone 14 Pro Max, 15 Plus/Pro Max, 16 Plus 430px
iPhone 16 Pro Max, 17 Pro Max 440px

Many projects use 360px (Android) or 375px (iPhone) as the base, and mockups at 390, 393 or 402px — matching Figma's default iPhone frames — are increasingly common. Whichever width you get, the key is to check the mockup width and use that exact value as your base width.

2. The vw font formula

To convert a font size from the mockup to vw:

(mockup font size ÷ base width) × 100 = vw

For example, a 16px body font works out differently depending on the base width:

/* 360px mockup */ (16 / 360) * 100 = 4.444vw
/* 375px mockup */ (16 / 375) * 100 = 4.267vw
/* 390px mockup */ (16 / 390) * 100 = 4.103vw

You don't have to calculate each value by hand. Here's how to use the PX to VW converter:

  1. Pick the mockup width (360, 375, 390 and so on) from the Base width presets.
  2. Type a px value and the vw value appears immediately — no convert button. Click the result to copy it.
  3. For multiple lines of CSS, paste them into the Batch CSS converter to convert everything at once. @media conditions are left alone, and with "Keep ≤1px as px" turned on, border values stay in px too.

Common values are all on one page in the 360px, 375px and 390px conversion tables.

3. Actual size by device

Convert 16px from a 375px mockup to 4.267vw, and the rendered size changes with screen width like this:

Screen width Actual size of 4.267vw
360px15.36px
375px16px
390px16.64px
393px16.77px
402px17.15px
430px18.35px
440px18.77px

Across phones the difference is small, but the same 4.267vw becomes about 32.8px on a 768px tablet and about 81.9px on a 1920px monitor.

4. Why vw alone isn't enough

Font sizes set only in vw grow far too large on wide screens, and they ignore browser zoom and the font-size setting. There are two ways to fix that.

Option A: Cap it with a media query

p { font-size: 4.267vw; }

/* Lock it from the point where 4.267vw reaches 20px (about 469px) */
@media (min-width: 469px) {
  p { font-size: 1.25rem; } /* 20px */
}

The switch point is "target size ÷ vw value × 100" (20 ÷ 4.267 × 100 ≈ 469px). If you cut over at an arbitrary point like 768px instead, text that was about 32.7px at 767px suddenly shrinks at 768px — watch out for that.

Option B: Set a range with clamp() (recommended)

/* 16px at 375px → 20px at 768px; rem mixed in so user font settings apply */
p { font-size: clamp(1rem, 0.7615rem + 1.0178vw, 1.25rem); }

This gives 16px at 375px and below, about 16.6px at 430px, and 20px at 768px and above. Because the min and max are in rem and the preferred value mixes in rem too, the text grows when the user increases their browser font size. Enter the min/max screen widths and sizes in the clamp generator to get the value instantly, and use its slider to check the actual size at each screen width. Why you should mix in rem is covered in detail in vw units and web accessibility.

5. Things to watch when converting fonts

  • Set a minimum size: use the min value of clamp() as a floor so text never drops below 12px, even on very narrow screens. 16px (1rem) or larger is recommended for body text.
  • Line height: if you converted font sizes to vw, set line-height as a unitless number (e.g. line-height: 1.5) so it tracks the font size. Turn a px line height from the mockup into a ratio with the line height calculator.
  • Use rem for fixed sizes: for values that should stay fixed, use rem instead of px so they follow the user's font settings. The PX to REM converter does it in one step.

Conclusion

A mobile font size isn't a single fixed number — it moves with the screen width. Use the mockup width as your base width when converting to vw, and when you actually ship it, set min and max sizes with a rem-based clamp(). That keeps text comfortable to read on almost every mobile device.

Try it out right awayCSS Clamp GeneratorOpen →

Keep reading