Skip to content

Ready

Enter a domain on the left and run the test. Results stream in here.

Two tiny tags that decide how every page renders

The viewport meta tag and the character encoding declaration are two of the smallest pieces of markup on a page, and two of the most consequential. Get them right and nobody notices: the page fits a phone screen and every character displays as intended. Get them wrong and the symptoms are obvious: a shrunken desktop layout on mobile that people have to pinch to read, or text full of garbled symbols where accented letters, curly quotes and emoji should be.

This checker fetches the page, reads the viewport tag and the charset from both the HTML and the HTTP Content-Type header, and checks placement. Because both tags are set once in a template and then forgotten, they are exactly the kind of thing a redesign or framework migration breaks across thousands of pages at once.

width=device-width, initial-scale=1 and why it matters

The viewport tag tells a mobile browser how wide to lay out the page. With width=device-width, initial-scale=1, the browser uses the phone's real width, so your responsive CSS and media queries work. Without the tag, mobile browsers assume a desktop-sized canvas of about 980 pixels and zoom the whole page out to fit, producing tiny text and tap targets.

Google indexes the mobile version of pages (mobile-first indexing), so a page that renders as a desktop miniature on phones is judged as a poor mobile page. Google retired its standalone Mobile-Friendly Test and the Search Console mobile usability report in late 2023, but Lighthouse still checks for a viewport tag, and the user experience problem is the same either way. For a broader mobile check, use the Mobile-Friendly Test.

Five viewport problems the checker flags

No viewport tag at all, the most serious case. Missing width=device-width, so the layout width is not tied to the screen. Zoom disabled through user-scalable=no or a maximum-scale below 5, which stops people with poor eyesight from enlarging text and fails accessibility guidelines (iOS Safari ignores it anyway). A fixed pixel width such as width=1024, which forces a non-responsive layout. And more than one viewport tag, usually a theme and a plugin both adding one, where browsers apply whichever they read last.

UTF-8, the first 1024 bytes and the Content-Type header

The charset tells the browser how to turn bytes into characters. The modern answer is UTF-8, which covers every language plus symbols and emoji; the HTML standard requires UTF-8 for new documents. When the declaration is missing or wrong, the browser has to guess, and a wrong guess produces mojibake: strings like "é" where "é" should be.

Placement matters. A <meta charset> tag only counts if it sits within the first 1024 bytes of the document, so it belongs as the very first element in the head, before the title and any scripts. The checker looks for it there. It also reads the charset in the server's Content-Type header, because a charset in the HTTP header overrides the meta tag. If the two disagree, the header wins and the page can be decoded wrongly even though the HTML looks correct, so the checker reports any mismatch.

The correct head, in order

Charset first, viewport second, then everything else:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Page title</title>
  ...

If you control the server, also send Content-Type: text/html; charset=utf-8 so the header and the tag agree. You can see the header your server sends today with the HTTP Header Checker.

# Nginx: add charset=utf-8 to text responses
charset utf-8;
charset_types text/html text/css application/javascript text/plain;

# Apache (.htaccess or virtual host)
AddDefaultCharset UTF-8

Fixing the tags on WordPress, Shopify or a custom site

WordPress

Almost every theme prints both tags in header.php or the block theme template, and WordPress sets the charset from Settings (it should be UTF-8). If the checker finds two viewport tags, a plugin is adding a second one; disable that plugin option rather than editing core files. For an old theme with no viewport tag, add it with a header code plugin such as WPCode, or in a child theme's header.php right after the charset line.

Shopify

Both tags live in layout/theme.liquid. Open Online Store, Themes, Edit code, and check that <meta charset="utf-8"> is the first line inside the head and the viewport tag follows it. Shopify sends a UTF-8 header itself, so a mismatch usually means a hard-coded legacy charset in the theme.

Next.js and other frameworks

Next.js adds both tags automatically; adjust the viewport with the viewport export rather than a manual meta tag, which would create a duplicate. Static site generators normally include them in the base layout, so fix it there once.

Where broken encoding usually comes from

A file saved in one encoding but declared as another is the classic cause, for example a template edited on a system that defaults to Windows-1252 but labelled UTF-8. Content stitched together from several sources, such as a database with a legacy collation, an imported CSV or an API response, can corrupt just one field while the rest of the page looks fine. These problems only show on non-ASCII characters, so test pages with accented names, currency symbols and emoji.

What garbled text does to search engines and AI answers

Search engines and AI systems read your page as text before they summarise or quote it. If the encoding is wrong, names, technical terms and prices arrive mangled, and a garbled passage is a poor candidate to quote. Correct UTF-8 is the baseline that makes your content readable by machines at all. To see how your page reads once the markup is stripped away, try Page to Markdown.

After fixing anything here, re-run the check, load the page on a real phone to confirm it fills the screen without sideways scrolling, and add this check to your post-launch routine. Both tags are template-level settings, so one careless deploy can remove them from every page at once.

How it works

  1. Enter Your URL

    Paste the page URL. We fetch the live HTML so we can inspect the head section.

  2. Inspect Both Tags

    We read the viewport meta tag's content value and the charset declaration, checking placement and correctness.

  3. Get Pass/Fail Verdicts

    You get a clear result for mobile viewport readiness and UTF-8 encoding, with fixes for anything missing or misconfigured.

Frequently asked

What does the viewport meta tag do?

›

The viewport tag (<meta name="viewport" content="width=device-width, initial-scale=1">) tells mobile browsers to lay the page out at the device's real width instead of a desktop-sized canvas of about 980 pixels scaled down. Without it, phones show a tiny zoomed-out desktop layout.

Is the viewport tag a Google ranking factor?

›

Not on its own. But Google indexes the mobile version of pages, and a page without a working viewport renders as a desktop miniature on phones, which is a poor mobile experience. Lighthouse also flags a missing viewport tag.

What's the correct viewport content value?

›

width=device-width, initial-scale=1. Avoid user-scalable=no and maximum-scale values below 5, which stop people from zooming in to read and fail accessibility guidelines. Avoid fixed widths such as width=1024. This tool flags all three.

Why does the charset declaration matter?

›

It tells the browser how to turn bytes into text. Use UTF-8, which covers every language plus symbols and emoji. A missing or wrong charset causes garbled characters (mojibake), and search engines and AI systems can ingest the garbled text.

Where should the charset declaration go?

›

<meta charset="utf-8"> must sit within the first 1024 bytes of the document, ideally as the first element inside <head>, before the title and any scripts. This tool checks that it appears early enough.

Can the charset be set by an HTTP header instead?

›

Yes. The Content-Type header can include charset=utf-8, and it takes precedence over the meta tag. Keep the meta tag too, for pages saved or served without the header. This tool reads both and warns when they disagree.

Why does the tool warn about two viewport tags?

›

Usually a theme and a plugin both add one. Browsers apply whichever they read last, so the result depends on order. Remove one so there is a single, correct tag.

Doesn't Google's Mobile-Friendly Test check this?

›

Google retired its standalone Mobile-Friendly Test and the Search Console mobile usability report in December 2023. Lighthouse in Chrome DevTools still checks for the viewport tag, and this tool checks the viewport and charset together in one run.

Related tools

More Technical SEO tools

See all Technical SEO tools · All free SEO tools

Related guides

↳ full site audit190+ checks · AI fix instructions · yearly plans