URL Length Limits | December 20th, 2007
This has come up a couple times for me now so I thought I’d post this information for others so there is yet another place to find it.
It turns out that there are limits to the size or your querystring (what’s in your address bar). This depends on your browser:
Microsoft Internet Explorer
The maximum length of a URL in Internet Explorer is 2,083 characters, with no more than 2,048 characters in the path portion.
Firefox
After 65,536 characters, the location bar no longer displays the URL in Windows Firefox 1.5.x. However, longer URLs appear to work.
Safari
At least 80,000 characters will work.
Opera
At least 190,000 characters will work.
Apache Server
The official Apache documentation only mentions an 8,192-byte limit on an individual field in a request. However, independent tests indicate it’s closer to 4,000 Characters.
Microsoft Internet Information Server (IIS)
The default limit is 16,384 characters (yes, Microsoft’s web server accepts longer URLs than Microsoft’s web browser). This is configurable.
Perl HTTP::Daemon Server
Up to 8,000 bytes will work. Those constructing web application servers with Perl’s HTTP::Daemon module will encounter a 16,384 byte limit on the combined size of all HTTP request headers. This does not include POST-method form data, file uploads, etc., but it does include the URL. In practice this resulted in a 413 error when a URL was significantly longer than 8,000 characters.