HTTP byte range resolver

Resolve a Range header against a representation length, including suffix and open-ended ranges. This local model does not send a server request.

The example value has been entered. Check it immediately or change the value.

Input is processed in the browser. Refreshing returns a sample value.

Result

Instructions and example

Clip range ends to length−1 and resolve suffixes from the end. No satisfiable ranges yields the 416 model.

For length 1000, 0-99 covers 100 bytes and -50 resolves to 950-999, covering 50 bytes.

Only bytes and up to 30 ranges. Overlaps are not merged; actual response decisions, conditional requests and multipart boundaries are not generated.

Frequently asked questions

Is an end beyond the representation length invalid?

If the start is in range, the end is clipped to the last byte.

What does suffix range -0 select?

It selects no bytes. Without another satisfiable range, the model returns 416.

Calculation criteria and reference materials

Verification of calculation criteria: · Calculation·verification principles · Report errors