Uint8Array base64 and hex conversion
Limited availability
The Uint8Array
object methods fromBase64()
, toBase64()
, and setFromBase64()
convert to and from base64 strings. The fromHex()
, toHex()
, and setFromHex()
methods convert to and from hex strings.
To learn more, see
Uint8Array.fromBase64(),
Uint8Array.fromHex(),
Uint8Array.prototype.setFromBase64(),
Uint8Array.setFromHex(),
Uint8Array.prototype.toBase64(),
Uint8Array.prototype.toHex() at MDN.
Compatibility
- Chrome ❌ See crbug.com/42204568
- Chrome Android ❌ See crbug.com/42204568
- Edge ❌ See crbug.com/42204568
- Firefox ❌ Search for bugs Search for standards position
- Firefox for Android ❌ Search for bugs Search for standards position
- Safari ❌ Search for bugs Search for standards position
- Safari on iOS ❌ Search for bugs Search for standards position
Specifications
- Uint8Array to/from base64, from TC39 (Ecma International).