microsoft internet explorer (browser)
microsoft states that the maximum length of a url in internet explorer is , with no more than 2,048 characters in the path portion of the url. in my tests, attempts to use urls longer than this produced a clear error message in internet explorer.
firefox (browser)
after 65,536 characters, the location bar no longer displays the url in windows firefox 1.5.x. however, longer urls will work. i stopped testing after 100,000 characters.
safari (browser)
at least 80,000 characters will work. i stopped testing after 80,000 characters.
opera (browser)
at least 190,000 characters will work. i stopped testing after 190,000 characters. opera 9 for windows continued to display a fully editable, copyable and pasteable url in the location bar even at 190,000 characters.
apache (server)
my early attempts to measure the maximum url length in web browsers bumped into a server url length limit of approximately 4,000 characters, after which apache produces a “413 entity too large” error. i used the current up to date apache build found in red hat enterprise linux 4. the official apache documentation only mentions an 8,192-byte limit on an individual field in a request.
microsoft internet information server
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. this limitation can be easily removed. look for all occurrences of 16×1024 in daemon.pm and replace them with a larger value. of course, this does increase your exposure to denial of service attacks.