Maximum on HTTP header values?

Is there an accepted maximum allowed size for HTTP headers? If so, what is it?

In practice you’re limited by server implementations. In Apache the default maximum is 8kb for the entire header, and I think nginx has the same default.


Just leaving this headere for addition to @i40west

Source: Maximum on HTTP header values? - Stack Overflow

  • Apache - 8K
  • Nginx - 4K-8K
  • IIS - 8K-16K
  • Tomcat - 8K – 48K
  • Node (<13) - 8K; (>13) - 16K

Depending on, if that question was related to Cloudflare. I found this doc for Workers: Limits · Cloudflare Workers docs

Request limits

URLs have a limit of 16 KB.
Request headers observe a total limit of 32 KB, but each header is limited to 16 KB.


Thank you so much!

>8k can trigger a 520:

If this is for pages then the max header length line is 1000 characters

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.