Fixed-Width Byte Layout
Validate fixed-width UTF-8 record layouts and flag invalid character boundaries, malformed lengths, and missing required fields.
Custom requests cost 0.04 USDC on Base.
Download example JSON · OpenAPI · Source and usage
Pay with a browser wallet · Open example in checkout
POST a JSON request to /fixed-width-byte-layout/v1/check with an x402 V2 client.
Worked example
Request
{
"width": 5,
"fields": [
{
"name": "code",
"offset": 0,
"length": 1,
"required": true
},
{
"name": "memo",
"offset": 1,
"length": 4,
"required": false
}
],
"records": [
"A🙂",
"🙂A",
"A",
" "
]
}Result
{
"valid_records": 1,
"invalid_records": [
{
"record": 2,
"bytes": 5,
"issues": [
{
"field": "code",
"reason": "split_utf8"
},
{
"field": "memo",
"reason": "split_utf8"
}
]
},
{
"record": 3,
"bytes": 1,
"issues": [
{
"field": null,
"reason": "wrong_width"
}
]
},
{
"record": 4,
"bytes": 5,
"issues": [
{
"field": "code",
"reason": "required_blank"
}
]
}
]
}Support catalog maintenance through GitHub Sponsors. Sponsor gptenv · Sponsor Jeremy Carter