Skip to main content
HTML Validation

Bad value “text/html; charset=Shift_JIS” for attribute “content” on element “meta”: “charset=” must be followed by “utf-8”.

About This HTML Issue

A meta element with http-equiv="Content-Type" must declare utf-8 as the character encoding. Other encodings like Shift_JIS are not allowed in HTML5.

The HTML specification requires all documents to be encoded in UTF-8. The meta element's content attribute, when used with http-equiv="Content-Type", must contain exactly text/html; charset=utf-8. Legacy encodings such as Shift_JIS, EUC-JP, ISO-8859-1, and others are non-conforming.

If the document actually uses Shift_JIS encoding, it needs to be converted to UTF-8 first. Most text editors and IDEs can re-save a file in a different encoding. After converting the file, update the meta declaration to reference UTF-8.

The shorter <meta charset="utf-8"> form is equivalent and generally preferred because it is simpler.

HTML examples

Invalid encoding declaration

<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

Fixed using the short form

<meta charset="utf-8">

Fixed using the http-equiv form

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Help us improve our guides

Was this guide helpful?
🌍 Trusted by teams worldwide

Validate at scale.
Ship accessible websites, faster.

Automated HTML & accessibility validation for large sites. Check thousands of pages against WCAG guidelines and W3C standards in minutes, not days.

Scheduled Reports
API Access
Open Source Standards
$7 / 7 days

Pro Trial

Full Pro access. Cancel anytime.

Start Pro Trial →

Join teams across 40+ countries