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
- Enter label. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| label | Formatted label for the supplied components under the convention above. | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| lengthOctet | Length Octet | Required. Safe integer. |
{
"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
Similar or alternative tools
- web/url-hostname
A hostname names the host without its port.
- Content Type Charset Single Parameter
Require charset to be a nonempty HTTP token, lowercase it, and prepend charset= for parameter.