Skip to content

Main content

Base64 Sextet Padding Mask Tool

Inspect unused bits of an explicitly selected final Base64 sextet under the one-byte/two-byte tail convention.

Loading tool…

Description

Inspect unused low bits of a Base64 tail sextet.

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.

Inspect unused low bits of a Base64 tail sextet.

When to use this tool

Use Base64 Sextet Padding Mask when inspecting one stated alphabet, group or padding component.

How to use the tool and how it works

  1. Enter sextet, finalOfOneByte. 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 unusedBitCount, mask, unusedValue, canonicalPadBits. Inspect canonicalPadBits before interpreting the associated values.

Inspect unused low bits of a Base64 tail sextet. Require sextet in [0,63]; use four unused bits for finalOfOneByte, otherwise two, returning mask, unusedValue and canonicalPadBits.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
sextetSextetRequired. Safe integer; minimum 0; maximum 63.
finalOfOneByteFinal Of One ByteRequired. Boolean.
Output fieldInterpretationReturned shape
unusedBitCountUnused Bit CountRequired. Safe integer.
maskMaskRequired. Safe integer.
unusedValueUnused ValueRequired. Safe integer.
canonicalPadBitsCanonical Pad BitsRequired. Boolean.
json
{
  "input": {
    "sextet": 16,
    "finalOfOneByte": true
  },
  "output": {
    "unusedBitCount": 4,
    "mask": 15,
    "unusedValue": 0,
    "canonicalPadBits": true
  }
}

Limitations and assumptions

  • The supplied tail context is assumed; no full quartet, padding count or payload is decoded.
  • 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/base64-sextet-padding-mask — tool.io

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

Similar or alternative tools