Skip to content

Main content

DNS Label Wire Length Field Tool

Return an uncompressed DNS label length octet for an explicit ASCII octet string, including the empty root label. This is not IDNA or hostname validation.

Loading tool…

Description

Require an ASCII label of at most 63 code units and return its length as lengthOctet.

Protocol fields often encode several values in a small token. Checking its supported grammar or extracting a component is narrower than validating a complete message or the behavior of its sender.

Require an ASCII label of at most 63 code units and return its length as lengthOctet.

When to use this tool

Use DNS Label Wire Length Field when you need to inspect or format the supported protocol field in isolation.

How to use the tool and how it works

  1. Enter label. 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 lengthOctet. Use the output convention below.

Require an ASCII label of at most 63 code units and return its length as lengthOctet.1

Input fieldMeaning and unitsAccepted input
labelFormatted label for the supplied components under the convention above.Required. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
lengthOctetLength OctetRequired. Safe integer.
json
{
  "input": {
    "label": "example"
  },
  "output": {
    "lengthOctet": 7
  }
}

Limitations and assumptions

  • Empty labels and ASCII controls pass this length check; hostname syntax, IDNA, compression, total DNS-name length, and label contents are not validated.
  • 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.

Alternative or Complementary methods

Validate the complete message and its context with the relevant protocol implementation when interoperability matters.

References

  1. Calculation and input contract: network/dns-label-wire-length-field — tool.io

Similar or alternative tools