This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note: This feature is available in Web Workers.
The bytes() method of the Blob interface returns a Promise that resolves with a Uint8Array containing the contents of the blob as an array of bytes.
bytes()
None.
A Promise that fulfills with a Uint8Array object containing the blob data.
The method will reject the returned Promise if, for example, the reader used to fetch the blob's data throws an exception.
| Specification |
|---|
| File API> # dom-blob-bytes> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
bytes |
No | No | 128 | No | 18 | No | 128 | No | 18 | No | No | 18 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Blob/bytes