Charset Declared.
Missing charset can cause text rendering issues across browsers
What does this check test?
This check verifies that the HTML document declares its character encoding, either via a `<meta charset="utf-8">` tag in the `<head>` or via the `Content-Type` HTTP header with a charset parameter (e.g., `Content-Type: text/html; charset=utf-8`). The charset declaration must appear within the first 1024 bytes of the HTML document. Without a declared charset, browsers must guess the encoding, which can lead to mojibake (garbled text), rendering delays while the browser auto-detects the encoding, and potential security vulnerabilities related to encoding-based XSS attacks.
Why does it matter?
When the browser does not know the character encoding, it must scan the document to guess — this auto-detection process delays rendering because the browser cannot safely parse the HTML until the encoding is determined. Incorrect encoding guesses cause text to render as garbled characters (mojibake), which is especially problematic for sites serving non-ASCII characters (accented letters, CJK characters, emoji). Encoding ambiguity can also be exploited for XSS attacks in older browsers where encoding confusion allows script injection. UTF-8 is the universal standard that supports all languages and characters — there is no reason to use any other encoding for new websites.
Who is affected?
All websites should declare their character encoding. Sites serving multilingual content, sites with user-generated content that may contain special characters, sites migrated from older systems that used legacy encodings (ISO-8859-1, Windows-1252, Shift_JIS), and sites with dynamically generated HTML where the charset header may not be set consistently are most at risk of encoding issues.
Where does this apply?
Check the HTML `<head>` section for a `<meta charset>` tag — it should be the first element inside `<head>`, before any other tags that contain text. Also check the `Content-Type` HTTP response header for a charset parameter. In Chrome DevTools, the 'Encoding' shown in the Network panel's Response Headers should match the declared charset. If the response header and meta tag disagree, the response header takes precedence.
How to fix it
<head>
<meta charset="utf-8" />
<title>Page Title</title>
</head> server {
charset utf-8;
} References
- Charset declaration — Chrome Developers
- Character encoding — MDN
- Character encodings for beginners — W3C
AppVet checks Charset Declared automatically
Run a free performance scan and get a full report with actionable fixes, including a Fix with AI prompt you can paste into any coding tool.
Run Audit