Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The Uint8ClampedArray typed array represents an array of 8-bit unsigned integers clamped to 0–255. The contents are initialized to 0 unless initialization data is explicitly provided. Once established, you can reference elements in the array using the object's methods, or using standard array index syntax (that is, using bracket notation).
Uint8ClampedArray is a subclass of the hidden TypedArray class.
Creates a new Uint8ClampedArray object.
Also inherits static properties from its parent TypedArray.
Uint8ClampedArray.BYTES_PER_ELEMENTReturns a number value of the element size. 1 in the case of Uint8ClampedArray.
Inherits static methods from its parent TypedArray.
Also inherits instance properties from its parent TypedArray.
These properties are defined on Uint8ClampedArray.prototype and shared by all Uint8ClampedArray instances.
Uint8ClampedArray.prototype.BYTES_PER_ELEMENTReturns a number value of the element size. 1 in the case of a Uint8ClampedArray.
Uint8ClampedArray.prototype.constructorThe constructor function that created the instance object. For Uint8ClampedArray instances, the initial value is the Uint8ClampedArray constructor.
Inherits instance methods from its parent TypedArray.
| ECMAScript® 2027 Language Specification # sec-typedarray-objects |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 10, 2025 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.