Request negotiation · Request header
Accept-Language
Preferred human languages for the response.
What is Accept-Language?
Sent by browsers to indicate the user's preferred languages, ordered by q-value (quality weight). Each language tag may carry a `;q=` factor from 0 to 1; tags without one default to q=1.0 (highest priority). The server reads the list, sorts by q descending, and picks the best localized version it can serve. Example: `en-US, en;q=0.9, fr;q=0.8` means 'prefer US English, then any English, then French'.
Typical usage
Read by servers that serve localized content. Add `Accept-Language` to the Vary header when the response differs by language so caches don't serve the wrong locale.
Examples
Weighted preference list
Accept-Language: en-US, en;q=0.9, fr;q=0.8, de;q=0.7Single language
Accept-Language: jaAny language accepted
Accept-Language: *Also known as
Also commonly written as: accept-language header · accept language header · accept-language q value · accept-language qvalue parsing · parse accept-language header · en-us;q=0.9 meaning. These variants — including plural forms, unhyphenated spellings, and Japanese (ヘッダ) — all refer to the same Accept-Language HTTP header.
Specification
RFC 9110 §12.5.4
Frequently asked questions
What is the Accept-Language HTTP header?
Sent by browsers to indicate the user's preferred languages, ordered by q-value (quality weight). Each language tag may carry a `;q=` factor from 0 to 1; tags without one default to q=1.0 (highest priority). The server reads the list, sorts by q descending, and picks the best localized version it can serve. Example: `en-US, en;q=0.9, fr;q=0.8` means 'prefer US English, then any English, then French'.
Is Accept-Language a request or response header?
Accept-Language is a request header — the client sends it to the server. Read by servers that serve localized content. Add `Accept-Language` to the Vary header when the response differs by language so caches don't serve the wrong locale.
What does a Accept-Language header look like?
A typical Accept-Language header looks like: Accept-Language: en-US, en;q=0.9, fr;q=0.8, de;q=0.7 (Weighted preference list).
Related headers
Vary
Which request headers cause different cached variants of the response.
Accept
Which media types the client can process.
Accept-Encoding
Which content encodings (compressions) the client accepts.
User-Agent
The client software identifying itself.
Host
The requested host name and port.
Referer
The URL of the previous page that led to this request.