Search Tools

HTTP Accept Quality Values and Representation Selection

Check how content preferences in an HTTP request match the representations available from the server

What to calculate

An absent header differs from a sent header with an empty value. Choosing not sent ignores any entered header value.

Enter when the header was sent. q must be from 0 to 1 with at most 3 decimal places. An empty value produces no matches. Commas and semicolons within quoted strings are supported.

Available candidates (media types)Required
RowMedia typeServer priorityActions
1
2

Paste 2 tab-separated columns into the leftmost field. Up to 100 rows.

Examples: text/html or text/plain; charset=utf-8. Priority must be an integer of 0 or greater; smaller values are selected first. Blank rows do not count as candidates.

Results

Results update automatically when the required values are entered.

Report an issue

Method, applicability and sources

Calculation method

Read ranges and q values from the header. Omitted q defaults to 1; q=0 excludes a match. For Accept, determine each candidate's q by specificity in this order: exact type/subtype with parameters > exact type/subtype > type/* > */*. For Accept-Language, RFC 4647 Basic Filtering checks a full tag or a prefix ending at a hyphen boundary. The longest applicable range determines q; this is this tool's explicit selection policy. Among ranges with equal specificity, prefer higher q, then the earlier header entry. Rank candidates by descending q, then ascending serverPriority, then input row order. With an absent header all candidates have q=1; with a sent but empty header all candidates are non-matches.

Worked example (hypothetical values)

For Accept: text/*;q=0.5,text/html;q=0, text/html is excluded with q=0 and text/plain is acceptable with q=0.5. For Accept-Language: ja, en;q=0.8, ja-JP has q=1 and en-US has q=0.8.

Applicability and limitations

Priority checks for HTTP response candidates represented by a media type or a single language tag. Excludes Accept-Encoding, Accept-Charset, representations with multiple language tags, RFC 4647 Lookup/Extended Filtering, server-specific tie-breaking or content generation, actual HTTP communication and generation of 406 responses.

Methods used

  • Accept media types (RFC 9110 §12.5.1): scope Media-range specificity → q → candidate serverPriority; region global
  • Accept-Language (RFC 9110 §12.5.4 / RFC 4647 §3.3.1): scope Basic Filtering plus this tool's policy of using the longest matching range for each candidate; region global

Method and sources

Method: RFC 9110 (June 2022, §§12.4.1–12.5.1/12.5.4; incorporates Erratum 7138); RFC 4647 (September 2006, §§2.1/3.3.1). Data recorded: 2026-11-14.