HTTP Range Header Builder

Build a 'Range: bytes=…' header for HTTP byte-range requests.

Open tool

Overview

The HTTP Range header builder constructs valid Range: bytes=... values for partial GET requests. Pick a single range, a list of ranges, or a suffix-length request, and the builder emits the exact header string plus the matching Content-Range: you should expect back from the server on success.

Developers writing a resumable download client, video-streaming engineers requesting specific byte windows, and anyone debugging a 206 Partial Content response need a Range header builder online. Long-tail keywords covered: build HTTP Range bytes header, request first or last N bytes of a file, and multipart byte range request example.

How it works

Range requests are defined in RFC 9110. A client sends Range: bytes=start-end to request a specific byte window of a resource. start-end is inclusive on both ends. Open-ended forms are valid too: bytes=500- means "from offset 500 to the end", and bytes=-500 means "the last 500 bytes". Multiple ranges in a single request are comma-separated: bytes=0-99,200-299.

A server that honours the request returns 206 Partial Content with Content-Range: bytes start-end/total and the requested bytes in the body. Multiple ranges come back as a multipart/byteranges body, which is rare in practice — most CDNs reply to one range at a time. A server that does not support ranges returns the full resource with 200 OK and ignores the header.

Examples

  • First 1024 bytes: Range: bytes=0-1023.
  • Last 512 bytes (e.g. ZIP central directory): Range: bytes=-512.
  • From offset 1 MB onwards (resume a download): Range: bytes=1048576-.
  • Two windows for a video keyframe scan: Range: bytes=0-1023,5242880-5243903.

FAQ

How do I know whether a server supports ranges?

A response with Accept-Ranges: bytes advertises support. If the header is absent or set to none, range requests will be ignored. CDNs and object stores almost always support them.

What happens if my range is past the end of the file?

The server replies with 416 Range Not Satisfiable and a Content-Range: bytes */<length> header telling you the resource's actual size.

Are byte offsets zero-based?

Yes. bytes=0-0 is the very first byte; bytes=0-99 is the first 100 bytes.

Why does my range request come back as 200 instead of 206?

The server may not implement ranges, the resource may be dynamically generated, or an intermediary may have stripped the header. Check Accept-Ranges on a previous response to confirm support.

Try HTTP Range Header Builder

An unhandled error has occurred. Reload ×