Uint8Array base64 and hex conversion
Newly Available (since 2025-09-05)
Expected to be Widely Available on 2028-03-05
The Uint8Array.fromBase64() static method and the toBase64() and setFromBase64() instance methods convert to and from base64 strings. Similarly, the Uint8Array.fromHex() static method and the toHex() and setFromHex() instance methods convert to and from hex strings.
Browser support
- Chrome 140 Released on 2025-09-02
- Chrome Android 140 Released on 2025-09-02
- Edge 140 Released on 2025-09-05
- Firefox 133 Released on 2024-11-26
- Firefox for Android 133 Released on 2024-11-26
- Safari 18.2 Released on 2024-12-11
- Safari on iOS 18.2 Released on 2024-12-11
MDN documentation
Specifications
- ECMAScript® 2027 Language Specification (#sec-additional-properties-of-the-uint8array-constructor), from TC39 (Ecma International).
- ECMAScript® 2027 Language Specification (#sec-additional-properties-of-the-uint8array-prototype-object), from TC39 (Ecma International).
View as JSON | Edit this feature | Report an issue | Web-features entry: source, dist