HTTP Content Negotiation Tester

Compare declared representations with supplied Accept preferences in editable rows.

On-device No sign-up Free to use

Rank representations controls

?

One or more Accept field values, one per line. Media ranges may carry parameters and a q value, for example "text/html;level=1;q=0.8". Up to 24 ranges.

?

One or more language ranges such as "en-GB" or "*", each with an optional q value. The local syntax subset accepts a 1–8-letter first segment and 1–8-character letter/digit segments; it does not check registered languages or complete BCP 47 validity.

?

Content codings such as gzip, br or identity, each with an optional q value.

?

One per line as "media type | language | encoding | label". Use "-" for a missing language or encoding. Up to 30 lines.

?

Real servers differ when two representations score the same. The model can either follow the declared order or refuse to name a single winner.

Processed in your browser. Your inputs stay on this device.

Showing an example. Change the fields, then use rank representations to update it.

Result

Showing an example.

Rank the supplied English gzip HTML first under the example’s media, language and coding preferences.

HTML page (gzip) ranks first in this model.

Loading the tool. Your result will appear here.

https://usefreetools.net/http-content-negotiation-tester · 20 November 2026

Was this helpful?

How to use HTTP Content Negotiation Tester

  1. Enter Accept, Accept-Language and Accept-Encoding preferences. Leave a field blank to model an absent header, not a captured empty-header distinction.
  2. Use editable representation rows or the text list to supply media type, language, coding and an optional label. A dash represents no language or identity coding.
  3. Choose listed-order tie breaking or an unresolved tie. Inspect the updated quality scores and exclusion explanations.
  4. Download the ranking/report if useful, then compare with the actual server. This page does not fetch or transform a representation.

Example: HTTP Content Negotiation Tester

Rank the supplied English gzip HTML first under the example’s media, language and coding preferences.

You add
Accept: text/html, application/xhtml+xml;q=0.9, application/json;q=0.8, */*;q=0.5; Accept-Language: en-GB, en;q=0.9, fr;q=0.5, *;q=0.1; Accept-Encoding: gzip, br;q=0.9, identity;q=0.5, *;q=0; Offered representations: text/html | en-GB | gzip | HTML page (gzip) text/html | en-GB | br | HTML page (brotli) application/json | en | identity | JSON payload text/plain | fr | gzip | French plain text text/html | de | gzip | German HTML page; Equal-score policy: declare
You get
HTML page (gzip) ranks first in this model.

Options

Quality and specificity
A more specific matching media range determines that representation’s quality under the selected rules. q=0 excludes an applicable choice.
Tie policy
Declared order can resolve equal model scores, or the model can leave a tie unresolved. A real server can apply its own policy.
Accept
One or more Accept field values, one per line. Media ranges may carry parameters and a q value, for example "text/html;level=1;q=0.8". Up to 24 ranges.
Accept-Language
One or more language ranges such as "en-GB" or "*", each with an optional q value. The local syntax subset accepts a 1–8-letter first segment and 1–8-character letter/digit segments; it does not check registered languages or complete BCP 47 validity.
Accept-Encoding
Content codings such as gzip, br or identity, each with an optional q value.
Offered representations
One per line as "media type | language | encoding | label". Use "-" for a missing language or encoding. Up to 30 lines.
Equal-score policy
Real servers differ when two representations score the same. The model can either follow the declared order or refuse to name a single winner.

Supported inputs and limits

  • Up to 24 ranges per supported preference field and 30 offered representations.
  • Selected media/language/encoding subset only; no request, codec test, server configuration or guarantee of actual origin selection.
  • Blank fields model absent headers.
  • Quoted delimiters and repeated quality parameters are refused.
  • Preference scores and exclusion reasons use the documented tie policy.
More details

No live server response or complete implementation of every negotiation variant is claimed.

Language syntax uses 1–8-letter first segments and 1–8-character letter/digit segments.

Registered language names, complete BCP 47 validity and extended matching are outside this model.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved on your device.

The ranking order is a declared model

After determining each matching quality, the model sorts acceptable choices by media quality first, then language quality, then encoding quality. It does not multiply the three scores. A zero in any applicable dimension excludes that representation. Equal triples use listed order or remain unresolved, according to your choice. HTTP does not require every server to use this selection algorithm; check your application’s actual policy.

Questions about HTTP Content Negotiation Tester

Will a real server choose this winner?

It may use another selection or tie policy.

Does q=0 mean a low preference?

An applicable zero-quality value excludes that modeled choice.

Does it compress the offered data?

No. Encoding labels describe supplied representations; no payload is transformed.

Page updated · Project managed by Tony Hines · Report a problem with HTTP Content Negotiation Tester