Encoding Standard
Required whenever you work with binary data in JavaScript — ArrayBuffers from fetch, WebSocket binary frames, file contents, or crypto operations all need encoding/decoding. UTF-8 is the web's canonical encoding.
What It Defines
Defines TextEncoder and TextDecoder for converting between byte sequences and strings. Specifies UTF-8, UTF-16, and legacy encoding handling. TextEncoder always produces UTF-8; TextDecoder supports 40+ legacy encodings for backward compatibility.
Canonical (Normative)
Convenient (Practical)
Maintains the living standards for the web platform: HTML, DOM, Fetch, URL, Streams, and more. These are continuously updated living documents, not versioned snapshots.
Related Specs
Streams are how modern browsers handle large data: fetch response bodies, file reads, compression, and encoding are all stream-based. Understanding backpressure and piping is essential for efficient data processing.
The correct way to do crypto in the browser — no npm packages needed. Required for client-side encryption, token signing, secure key storage, and WebAuthn integration. Also available in Node.js and Deno.
JavaScript is the execution model of the web. The spec is the canonical reference for language semantics — closures, coercion, prototype lookup, module resolution, and async scheduling.