Idna label validate
idna-label-validate · version 1.0.0 · URLs & IP addresses · free, no key needed
Validate one already-mapped IDNA2008 label for registration or lookup.
Use when you need to: validate idna2008 label · check unicode label for idna registration · lookup profile a-label round trip.
Decide before calling
Read the versioned contract and the supported scope below. Reuse idna-label-validate@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use idna-label-validate@1.0.0 for validate idna2008 label. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- validate idna2008 label
- check unicode label for idna registration
- lookup profile a-label round trip
- is this already mapped domain label valid
- idna2008 ulabel permission check
- report why an idna label is rejected
- בדיקת תווית אינטרנט לפי תקן
Not supported
- map or normalize a label with UTS 46
- query DNS for this name
- decide whether the label is a homograph or phishing attempt
Behavior
- The label is already mapped. There is no UTS #46 mapping. ASCII case is folded for lookup. Registration requires a supplied A-label to be entirely lowercase; its first uppercase code point is alabel_not_lowercase.
- profile registration validates the label as a U-label, or as an entirely lowercase A-label round trip when the label is all ASCII and has an ASCII-case-insensitive xn-- prefix. profile lookup bypasses validation only for an all-ASCII NR-LDH label; reserved LDH labels with hyphens in positions 3 and 4 are validated.
- An A-label body is punycode-decoded. An empty decode is empty_label, a decode failure is punycode_decode, and an all-ASCII decode is ace_all_ascii. Otherwise the decoded U-label is validated and re-encoded; a mismatch with the canonical lowercase input is punycode_roundtrip. Lookup may lowercase an A-label before this comparison.
- U-label order: NFC (not_nfc), then UNASSIGNED, DISALLOWED, CONTEXTJ, and CONTEXTO, then a leading combining mark, then a hyphen at the start, the end, or both the third and fourth positions, then RFC 5893 when Bidi_Class R, AL, or AN occurs (bidi_rule), then wire length 1..63 (dns_label_length). A non-ASCII wire form is xn-- plus Punycode.
- reason_index is the code-point index of the first failure and cp is that code point. alabel is null unless the label is valid. data_version names the pinned Unicode 15.1 property table.
- Results are a deterministic rule check. They are not a homograph, phishing, DNS, or authenticity verdict. No DNS query is performed.
Input
label(string, required): min length 1; max length 252profile(one of "registration", "lookup", required)
Output
valid(boolean, required)reason(one of null, "disallowed", "unassigned", "contextj", "contexto", "not_nfc", "leading_combining_mark", "hyphen_position", "bidi_rule", "punycode_decode", "punycode_roundtrip", "alabel_not_lowercase", "punycode_encode", "ace_all_ascii", "dns_label_length", "not_ldh", "empty_label", required)reason_index(integer or null, required): min 0; max 251cp(integer or null, required): min 0; max 1114111form(one of "u-label", "a-label", "nr-ldh", null, required)ulabel(string or null, required): max length 252alabel(string or null, required): min length 1; max length 63direction(one of "ltr", "rtl", "none", required)bidi_condition(integer or null, required): min 1; max 6data_version(constant "idna2008-rfc5892-unicode-15.1.0", required)
Limits
- max label bytes: 252
- max output bytes: 8192
Example
Request input:
{
"label": "a",
"profile": "registration"
}
Response:
{
"result": {
"valid": true,
"reason": null,
"reason_index": null,
"cp": null,
"form": "u-label",
"ulabel": "a",
"alabel": "a",
"direction": "none",
"bidi_condition": null,
"data_version": "idna2008-rfc5892-unicode-15.1.0"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "idna-label-validate",
"version": "1.0.0",
"input": {
"label": "a",
"profile": "registration"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/idna-label-validate/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"label":"a","profile":"registration"}'
The machine-readable contract is at /v1/tools/idna-label-validate/versions/1.0.0.
CLI
node cli.mjs run idna-label-validate 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Idna domain diagnose: Validate each dot-separated IDNA2008 label and the 253-octet DNS wire length.
- Idna domain to ascii: Convert a domain to DNS ASCII with UTS #46 ToASCII, STD3, and DNS lengths.
- Idna domain to unicode: Convert a domain to Unicode with UTS #46 ToUnicode and decode A-labels.
- Idna domain map: Map a domain with the Unicode 17 UTS #46 table, steps 1 and 2 only.
- IPv4 address classify: Classify an IPv4 address against the static IANA IPv4 special-purpose address registry.
- IPv4 prefix set equal: Report whether two IPv4 prefix sets cover exactly the same addresses.