Content-Range Header Explained
What the HTTP Content-Range header does and when it's used.
Published October 17, 2026
Content-Range appears in 206 responses (and 416) to say which part of the resource is included and the total size, e.g. bytes 0-1023/52428800.
How it works
Clients use it to reassemble partial downloads.
The Content-Range header is part of the HTTP message and is case-insensitive in name.
In a real exchange
curl -i https://example.com/
Content-Range: bytes 0-1023/52428800
Practical examples
The header
Content-Range: bytes 0-1023/52428800Set or use it in code
res.status(206).set('Content-Range', `bytes ${s}-${e}/${total}`)Inspect it
curl -sI https://example.com | grep -i 'content-range'Common mistakes
- Off-by-one errors in the range end
- Wrong total size
- Missing it in 206 responses
Key takeaways
- Content-Range: Content-Range appears in 206 responses (and 416) to say which part of the resource is included and the total size, e.g.
- Check it in browser DevTools → Network.
- Test with curl -I before deploying.
FAQ
What does bytes */1024 mean?
Used with 416: the resource is 1024 bytes long.
Is Content-Range case sensitive?
Header names are case-insensitive; values may not be.