Float16ArrayBaseline · Newly available
Float16Array is a typed array of 16-bit floating point numbers.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since Apr 4, 2025.
Browser support
DesktopChrome
1–134Not supported
135+Supportedsince Apr 1, 2025
Current: 155Edge
12–134Not supported
135+Supportedsince Apr 4, 2025
Current: 154Firefox
1–128Not supported
129+Supportedsince Aug 6, 2024
Current: 157Safari
1–18.1Not supported
18.2+Supportedsince Dec 11, 2024
Current: 27MobileChrome Android
18–134Not supported
135+Supportedsince Apr 1, 2025
Current: 155Firefox Android
4–128Not supported
129+Supportedsince Aug 6, 2024
Current: 157Safari iOS
1–18.1Not supported
18.2+Supportedsince Dec 11, 2024
Current: 27How to use
Every current browser supports this, but it only became Baseline on Apr 4, 2025. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: getFloat16.
Feature detection
JS · check before using
if (typeof Float16Array !== "undefined") {
// Float16Array is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (5). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| DataView.getFloat16 | 135 | 135 | 129 | 18.2 | 135 | 129 | 18.2 |
| DataView.setFloat16 | 135 | 135 | 129 | 18.2 | 135 | 129 | 18.2 |
| Float16Array | 135 | 135 | 129 | 18.2 | 135 | 129 | 18.2 |
| Float16Array.Float16Array | 135 | 135 | 129 | 18.2 | 135 | 129 | 18.2 |
| Math.f16round | 135 | 135 | 129 | 18.2 | 135 | 129 | 18.2 |