range string required RFC 9110 bytes Range value with 1–16 closed, open or suffix items.
Parse and resolve bounded RFC 9110 byte Range sets, plus validate satisfied, unknown-length and unsatisfied Content-Range field values.
Authoritative reference data or standards computation
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
range
required
| string | allowed: 8 – 1024 example: bytes=0-499,-200 | RFC 9110 bytes Range value with 1–16 closed, open or suffix items. |
size
required
| int | allowed: 0 – 9007199254740991 example: 1234 | Current representation length in bytes, bounded to JavaScript's exact safe-integer range. |
range string required RFC 9110 bytes Range value with 1–16 closed, open or suffix items.
size int required Current representation length in bytes, bounded to JavaScript's exact safe-integer range.
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
fields | list | example: range,unit | Return only these fields (comma-separated). Mutually exclusive with 'exclude'. |
exclude | list | example: unsatisfiedContentRange | Return all fields except these (comma-separated). |
pretty | boolean | default: false example: true | Pretty-print the JSON response. |
unwrap | boolean | default: false example: true | Drop the envelope: return the raw array/object without data/meta wrapper. |
fields list Return only these fields (comma-separated). Mutually exclusive with 'exclude'.
exclude list Return all fields except these (comma-separated).
pretty boolean Pretty-print the JSON response.
unwrap boolean Drop the envelope: return the raw array/object without data/meta wrapper.
| Field | Type | Description | Example |
|---|---|---|---|
range | string | Canonicalized bytes Range value, preserving item order. | bytes=0-499,-200 |
unit | string | Range unit; always bytes. | bytes |
size | integer | Representation length used to resolve the request. | 1234 |
requestedCount | integer | Number of requested range specifications. | 2 |
satisfiableCount | integer | Number of specifications satisfiable under RFC 9110. | 2 |
satisfiable | boolean | True when at least one requested specification is satisfiable. | true |
ranges | object[] | Requested items with kind, satisfiability, resolved inclusive positions, length and per-part Content-Range. | [{"requested":"0-499","kind":"closed","satisfiable":true,"start":0,"end":499,"length":500,"contentRange":"bytes 0-499/1234"}] |
contentRanges | string[] | Concrete Content-Range values for resolved non-empty parts, in request order. | ["bytes 0-499/1234","bytes 1034-1233/1234"] |
unsatisfiedContentRange nullable | string | bytes */size when the entire set is unsatisfiable, otherwise null. | null |
range string Canonicalized bytes Range value, preserving item order.
example: bytes=0-499,-200
unit string Range unit; always bytes.
example: bytes
size integer Representation length used to resolve the request.
example: 1234
requestedCount integer Number of requested range specifications.
example: 2
satisfiableCount integer Number of specifications satisfiable under RFC 9110.
example: 2
satisfiable boolean True when at least one requested specification is satisfiable.
example: true
ranges object[] Requested items with kind, satisfiability, resolved inclusive positions, length and per-part Content-Range.
example: [{"requested":"0-499","kind":"closed","satisfiable":true,"start":0,"end":499,"length":500,"contentRange":"bytes 0-499/1234"}]
contentRanges string[] Concrete Content-Range values for resolved non-empty parts, in request order.
example: ["bytes 0-499/1234","bytes 1034-1233/1234"]
unsatisfiedContentRange string nullable bytes */size when the entire set is unsatisfiable, otherwise null.
example: null
/api/http-ranges/parse?range=bytes%3D0-499%2C-200&size=1234 {
"data": {
"range": "bytes=0-499,-200",
"unit": "bytes",
"size": 1234,
"requestedCount": 2,
"satisfiableCount": 2,
"satisfiable": true,
"ranges": [
{
"requested": "0-499",
"kind": "closed",
"satisfiable": true,
"start": 0,
"end": 499,
"length": 500,
"contentRange": "bytes 0-499/1234"
},
{
"requested": "-200",
"kind": "suffix",
"satisfiable": true,
"start": 1034,
"end": 1233,
"length": 200,
"contentRange": "bytes 1034-1233/1234"
}
],
"contentRanges": [
"bytes 0-499/1234",
"bytes 1034-1233/1234"
],
"unsatisfiedContentRange": null
},
"meta": {
"endpoint": "http-ranges",
"route": "/parse",
"params": {
"range": "bytes=0-499,-200",
"size": 1234
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/http-ranges/parse?range=bytes%3D500-&size=800 {
"data": {
"range": "bytes=500-",
"unit": "bytes",
"size": 800,
"requestedCount": 1,
"satisfiableCount": 1,
"satisfiable": true,
"ranges": [
{
"requested": "500-",
"kind": "open",
"satisfiable": true,
"start": 500,
"end": 799,
"length": 300,
"contentRange": "bytes 500-799/800"
}
],
"contentRanges": [
"bytes 500-799/800"
],
"unsatisfiedContentRange": null
},
"meta": {
"endpoint": "http-ranges",
"route": "/parse",
"params": {
"range": "bytes=500-",
"size": 800
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/http-ranges/parse?range=bytes%3D0-&size=0 {
"data": {
"range": "bytes=0-",
"unit": "bytes",
"size": 0,
"requestedCount": 1,
"satisfiableCount": 0,
"satisfiable": false,
"ranges": [
{
"requested": "0-",
"kind": "open",
"satisfiable": false,
"start": null,
"end": null,
"length": 0,
"contentRange": null
}
],
"contentRanges": [],
"unsatisfiedContentRange": "bytes */0"
},
"meta": {
"endpoint": "http-ranges",
"route": "/parse",
"params": {
"range": "bytes=0-",
"size": 0
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} | Parameter | Type | Default & allowed | Description |
|---|---|---|---|
value
required
| string | allowed: 9 – 512 example: bytes 0-499/1234 | RFC 9110 bytes Content-Range value: inclusive range/size, range/* or */size. |
value string required RFC 9110 bytes Content-Range value: inclusive range/size, range/* or */size.
| Parameter | Type | Default & allowed | Description |
|---|---|---|---|
fields | list | example: value,unit | Return only these fields (comma-separated). Mutually exclusive with 'exclude'. |
exclude | list | example: completeLengthKnown | Return all fields except these (comma-separated). |
pretty | boolean | default: false example: true | Pretty-print the JSON response. |
unwrap | boolean | default: false example: true | Drop the envelope: return the raw array/object without data/meta wrapper. |
fields list Return only these fields (comma-separated). Mutually exclusive with 'exclude'.
exclude list Return all fields except these (comma-separated).
pretty boolean Pretty-print the JSON response.
unwrap boolean Drop the envelope: return the raw array/object without data/meta wrapper.
| Field | Type | Description | Example |
|---|---|---|---|
value | string | Validated canonical Content-Range field value. | bytes 0-499/1234 |
unit | string | Range unit; this endpoint supports bytes only. | bytes |
satisfied | boolean | True for an inclusive range response; false for the */size form used with 416. | true |
start nullable | integer | Inclusive first byte, or null for an unsatisfied range. | 0 |
end nullable | integer | Inclusive last byte, or null for an unsatisfied range. | 499 |
length nullable | integer | Number of bytes in a satisfied inclusive range, or null. | 500 |
size nullable | integer | Complete representation length, or null when represented by *. | 1234 |
completeLengthKnown | boolean | Whether Content-Range carries a numeric complete length. | true |
value string Validated canonical Content-Range field value.
example: bytes 0-499/1234
unit string Range unit; this endpoint supports bytes only.
example: bytes
satisfied boolean True for an inclusive range response; false for the */size form used with 416.
example: true
start integer nullable Inclusive first byte, or null for an unsatisfied range.
example: 0
end integer nullable Inclusive last byte, or null for an unsatisfied range.
example: 499
length integer nullable Number of bytes in a satisfied inclusive range, or null.
example: 500
size integer nullable Complete representation length, or null when represented by *.
example: 1234
completeLengthKnown boolean Whether Content-Range carries a numeric complete length.
example: true
/api/http-ranges/content-range?value=bytes%200-499%2F1234 {
"data": {
"value": "bytes 0-499/1234",
"unit": "bytes",
"satisfied": true,
"start": 0,
"end": 499,
"length": 500,
"size": 1234,
"completeLengthKnown": true
},
"meta": {
"endpoint": "http-ranges",
"route": "/content-range",
"params": {
"value": "bytes 0-499/1234"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/http-ranges/content-range?value=bytes%2042-1233%2F* {
"data": {
"value": "bytes 42-1233/*",
"unit": "bytes",
"satisfied": true,
"start": 42,
"end": 1233,
"length": 1192,
"size": null,
"completeLengthKnown": false
},
"meta": {
"endpoint": "http-ranges",
"route": "/content-range",
"params": {
"value": "bytes 42-1233/*"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} /api/http-ranges/content-range?value=bytes%20*%2F0 {
"data": {
"value": "bytes */0",
"unit": "bytes",
"satisfied": false,
"start": null,
"end": null,
"length": null,
"size": 0,
"completeLengthKnown": true
},
"meta": {
"endpoint": "http-ranges",
"route": "/content-range",
"params": {
"value": "bytes */0"
},
"generatedAt": "2026-07-29T08:13:22.000Z"
}
} Strict, bounded tools for RFC 9110 byte range requests. /parse accepts closed ranges (0-499), open ranges (500-), suffix ranges (-500) and multi-range sets, then resolves every item against a supplied representation size. Byte positions are inclusive, values above JavaScript's exact safe-integer limit are rejected, and no more than 16 ranges are accepted.
An invalid range set returns 400. A syntactically valid but unsatisfiable set returns a normal result with satisfiable=false and the 416 response value bytes */size; a mixed set remains satisfiable when at least one item can be served. RFC 9110 specifically defines a non-zero suffix range as satisfiable for a zero-length representation, although it resolves to zero bytes and has no concrete Content-Range positions—the response reports that edge case explicitly rather than inventing 0--1.
/content-range validates the three byte forms used by RFC 9110: a known complete length, an unknown complete length (*), or the unsatisfied */size form. It rejects reversed ranges and known complete lengths that are not greater than the last byte. This API parses header values; it does not fetch content or build multipart bodies.
Yes. bytes=-500 selects up to the final 500 bytes and bytes=500- selects from byte 500 through the representation's end.
Every item is reported separately, and the complete set is satisfiable when at least one item is satisfiable. The endpoint preserves request order and does not merge overlaps.
When no requested item is satisfiable, unsatisfiedContentRange contains the RFC 9110 value bytes */size, suitable for a 416 response.
No. RFC 9110 requires overflow-safe parsing; this API deliberately caps every byte integer at JavaScript's exact limit (9007199254740991) and returns 400 above it.
Complete pinned IANA HTTP field-name registry with status, Structured Field type, references, search and case-insensitive lookup.
The complete IANA HTTP status code registry with practical descriptions, defining RFCs and a retryable flag — list by category or look up a single code.
Parse RFC 9110 Accept media ranges and deterministically select the best available representation using specificity, parameters and q weights.
The complete IANA media type registry with file extensions merged in — look up any type or extension, or strictly parse a Content-Type value into its parts.