article
type: TechArticle
description: Declare UTF-8 as the document character encoding in the first 1024 bytes of the HTML, so browsers parse text correctly before they hit any non-ASCII content.
language: en
is part of: Web Specification Studio
author: Web Specification Studio
publisher: Web Specification Studio
license: https://creativecommons.org/licenses/by/4.0/
date modified: 2026-05-29T09:13:20.000Z
citation: HTML Living Standard — Specifying the document's character encoding
  type: CreativeWork
  publisher: WHATWG
citation: MDN — : charset
  type: CreativeWork
  publisher: MDN
citation: WHATWG Encoding Standard
  type: CreativeWork
  publisher: WHATWG

Web Specification Studio
type: WebSite

Web Specification Studio
type: Organization

breadcrumb
type: BreadcrumbList
item list element: Home
  type: ListItem
  position: 1
  item: https://webspecification.com/
item list element: Spec
  type: ListItem
  position: 2
  item: https://webspecification.com/spec/
item list element: Foundations
  type: ListItem
  position: 3
  item: https://webspecification.com/spec/foundations/
item list element: ListItem
  position: 4
  item: https://webspecification.com/spec/foundations/meta-charset/