Skip to main content
Base64 provides branded RFC 4648 standard (+, /, =) and URL-safe (-, _, unpadded) Base64 strings (BrandedBase64, BrandedBase64Url) with UTF-8 string and Uint8Array conversions.

Quick Start

Import from @tevm/voltaire or @tevm/voltaire/Base64.

Standard vs URL-Safe Alphabets

API Reference

Size Formula

  • Encoded standard length: 4 * Math.ceil(byteLen / 3).
  • Every 3 input bytes map to 4 Base64 characters (33% expansion).
  • Hex — Hexadecimal string encoding
  • Bytes — Raw byte arrays
  • Address — Includes Address.fromBase64