App Icon

Base32 Format

Back to Home

Overview

Base32 is a binary-to-text encoding scheme that represents binary data in ASCII string format. It uses a set of 32 different characters (A-Z, 2-7) to encode binary data, with = used for padding. This encoding is more compact than Base64 but less efficient.

Technical Details

Character Set

  • Uppercase letters (A-Z)
  • Numbers (2-7)
  • Padding character (=)

Key Features

  • Case-insensitive
  • URL-safe
  • More compact than Base64
  • Human-readable

Common Uses

  • DNS records
  • File systems
  • QR codes
  • Two-factor authentication

Examples

Basic Encoding

Original: Hello World!
Base32: JBSWY3DPEBLW64TMMQ======

Original: 😊
Base32: 6CPZR====

Implementation

JavaScript Example

// Using base32-js library
const base32 = require('base32-js');

// Encoding
const text = "Hello World!";
const encoded = base32.encode(Buffer.from(text));
console.log(encoded); // "JBSWY3DPEBLW64TMMQ======"

// Decoding
const decoded = base32.decode(encoded);
console.log(decoded.toString()); // "Hello World!"

References