Skip to content

Main content

Decoding: Base32 Final Symbol Pad Bits Check Tool

Inspect unused bits of a final RFC4648 Base32/Base32hex symbol for a supplied unpadded final-block symbol count; no whole-stream decode.

Loading tool…

Description

Check Base32 final-symbol canonicality under an explicit tail count.

Encoded representations separate alphabet symbols, numerical digit values, byte grouping and tail padding. Recognizing one symbol or pad-bit pattern is not full payload decoding, and different alphabet variants can assign different values.

Check Base32 final-symbol canonicality under an explicit tail count.

When to use this tool

Use Decoding: Base32 Final Symbol Pad Bits Check when inspecting one stated alphabet, group or padding component.

How to use the tool and how it works

  1. Enter finalSymbol, symbolCount, variant. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Check Base32 final-symbol canonicality under an explicit tail count. Require variant base32/base32hex, a recognized uppercase symbol and symbolCount 2,4,5,7 or 8; unused bits are 2,4,1,3 or 0 respectively.1

Canonical Base-N encodings require unused pad bits to be zero; alphabet membership alone does not establish canonical encoding.2

Input fieldMeaning and unitsAccepted input
finalSymbolFinal SymbolRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
symbolCountNumber of data symbols in the final Base32 block: 2, 4, 5, 7 or 8; excludes written equals padding.Required. Safe integer.
variantVariantRequired. Text; one of "base32", "base32hex". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultReturned object; expand its named members below.Required. Object.
result.unusedBitsUnused BitsCalculated result member: number.
result.canonicalPadBitsCanonical Pad BitsCalculated result member: boolean.
json
{
  "input": {
    "finalSymbol": "B",
    "symbolCount": 2,
    "variant": "base32"
  },
  "output": {
    "result": {
      "unusedBits": 2,
      "canonicalPadBits": false
    }
  }
}

Limitations and assumptions

  • The count excludes written padding and must reflect the final group; no complete stream is checked.
  • Outputs are nested inside result. Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete codec matching the required alphabet and canonicality rules for real encoded data.

References

  1. Calculation and input contract: decode/base32-final-symbol-pad-bits-check — tool.io

  2. RFC 4648: Base-N encodings — RFC Editor

Similar or alternative tools