Character encoding declaration

Why a page should declare its character encoding, what the scan looks for in the HTML, and how to add the meta charset tag so accents and symbols display right.

What AuditX checks

The scan reads the HTML of the page you scanned: the copy a browser produced when the site needs a browser to show its content, otherwise the page as the server sent it. It passes when it finds a meta tag with a charset attribute, a meta http-equiv="Content-Type" tag whose content contains charset=, a charset in the Content-Type header the server sends, or a byte order mark at the very start of the page. It warns when it finds none of these. Only the presence of the declaration is checked. The scan does not check which encoding is named, whether it is UTF-8, or whether the tag sits early in the head. It covers only this one page. This check has no info or not-measured state.

Why it matters

The character encoding tells the browser how to turn the bytes of the page into letters. Without it, the browser has to guess, and a wrong guess can show broken characters, such as an accented letter turned into two odd symbols.

The declaration has to fit completely within the first 1024 bytes of the document, so it belongs at the top of the head. MDN notes that UTF-8 is the only valid encoding for HTML5 documents.

How to fix it

  1. Add <meta charset="utf-8"> inside the head, as early as possible and before the title, or have the server send Content-Type: text/html; charset=utf-8. Either one is enough.
  2. Make sure the file itself is saved as UTF-8, so that the declaration and the real content agree.
  3. In a CMS, the theme template writes this tag. If it is missing, look at the header file of the theme, or ask the theme author.
  4. Your server can also send the encoding in its Content-Type header, for example charset=utf-8. That is a good extra, but this check only looks for the meta tag.
<head>
  <meta charset="utf-8">
  <title>Your page title</title>
</head>

Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.

Scan my site

Sources

Related checks

Last reviewed 2026-11-13.