DevToys Web Pro iconDevToys Web ProBlog
Traducido con LocalePack logoLocalePack
Califícanos:
Prueba la extensión del navegador:

Base32 Encoder / Decoder

Valid

Decoded Text

  • Encoded Base32

  • Loading editor...
    Loading editor...
    Detalles técnicos

    How the Base32 Encoder/Decoder Works

    What the Tool Does

    The Base32 encoder/decoder converts data to and from Base32 format, a binary-to-text encoding scheme that uses 32 printable ASCII characters (A–Z and 2–7). It is designed to be human-friendly and case-insensitive, making it suitable for environments where lowercase letters are not available or where humans must manually transcribe encoded strings. Common uses include TOTP secret keys for two-factor authentication apps and file system paths on case-insensitive systems.

    Common Developer Use Cases

    Developers use Base32 encoding when generating OTP/TOTP secret keys compatible with authenticator apps like Google Authenticator, when creating compact identifiers that are safe to use in URLs and file names, and when encoding binary data for systems that cannot handle arbitrary byte values. Decoding is commonly needed when extracting the raw bytes from an OTP secret or verifying a Base32-encoded payload received from a third-party service.

    Data Formats, Types, or Variants

    Standard Base32 (RFC 4648) uses the alphabet A–Z and 2–7, with = padding to make the output a multiple of 8 characters. Base32hex uses the alphabet 0–9 and A–V for natural sort order. The encoded output is approximately 60% larger than the original input. Padding can sometimes be omitted in contexts like TOTP secrets. The tool handles both standard and padded variants during decoding.

    Common Pitfalls and Edge Cases

    Base32 is case-insensitive, so decoders should normalise input to uppercase before processing. Invalid characters (anything outside A–Z and 2–7) will cause a decoding error. Do not confuse Base32 with Base32hex — they use different alphabets and produce different output. Padding characters must be present when required by the spec; some implementations silently accept missing padding while others fail.

    When to Use This Tool vs Code

    Use this browser tool for quick Base32 encoding and decoding, especially when working with TOTP secrets or inspecting encoded payloads during development. For production applications, use a language-native library such as base32 (Python), hi-base32 (JavaScript), or Apache Commons Codec (Java) so encoding is reproducible, tested, and integrated into your build pipeline.