50

I have seen this popular question:

What is the maximum length of a URL in different browsers?

But since I couldn't find a reference to Google Chrome directly (and since most answers were given a few years ago) I was wondering what is the current limitation of URL length for the Google Chrome browser?

1

4 Answers 4

46

I believe it's stayed the same:

I could not find any limits on Chrome and Safari. Both are based on WebKit and it seems to have similar limits as Firefox has.

Firefox stops displaying after 64k characters, but can serve more than 100k characters.

you can read more about it in this article.

Generally speaking there is no "limit" to a URL's length, but this answer states that you should keep your URL's under 2048 chars regardless to make sure it works in every client and server.

More information about all browsers here.

6
  • @SteveCampbell better?
    – chriz
    Commented Jul 16, 2014 at 14:13
  • 1
    This still doesn't answer the question, the quote on the site is about Firefox not Chrome, and it doesn't make sense.
    – callum
    Commented Jan 12, 2015 at 14:55
  • @callum A quote from the site: "I could not find any limits on Chrome and Safari. Both are based on WebKit and it seems to have similar limits as FireFox has."
    – chriz
    Commented Jan 12, 2015 at 15:21
  • Right, but in your answer you quoted a line about Firefox
    – callum
    Commented Jan 14, 2015 at 17:47
  • ... because it is the same as Chrome
    – chriz
    Commented Jan 14, 2015 at 19:10
23

The current limit in Chrome is 2MB. This issue is discussed here:

https://code.google.com/p/chromium/issues/detail?id=69227

You'll find resources there such as a workaround when you need to overcome the issue for things such as displaying an image with a "toDataUrl" source.

2
  • 2
    2MB is equivalent to 2,097,152 characters, which is quite different to the length on the accepted answers on the other thread (2,000 characters).
    – alexkb
    Commented Aug 19, 2021 at 7:46
  • 1
    That threat says 2MB may be the limit with respect to serializing data, which appears to be a reference to the data URI scheme (as in a uniform resource identifier) rather than an actual HTTP(S) URL (as in a uniform resource location, a subset of URIs). The referenced answer says that as of January 2021, Chrome's limit is 32779 in the location bar and >64k in document.location or an anchor tag.
    – Adam Katz
    Commented Mar 13, 2022 at 22:34
4

Besides the fact that handling a URL might be implementation-dependent, the HTTP/1.1 specifications states in the RFC2616 that :

RFC 2616 (Hypertext Transfer Protocol — HTTP/1.1) states in section 3.2.1 that there is no limit to the length of an URI (URI is the official term for what most people call a URL).

I do not know how many maximum characters would be, at maximum, be accepted by Google Chrome, and don't even know if there currently exists such a limit. Perhaps would it be specified in an obscure define in the Chromium GIT repository or even specified by the maximum value of a text input in the Win32 API on windows for example.

However there is a limit on most web servers regarding URL lengths. They will probably in most cases throw a 413 Entity Too Large in response.

-3

In theory it should be unlimited, However in practise, most of the Http Clients or Browsers are limited to 2083 characters of Url Length.

Not the answer you're looking for? Browse other questions tagged or ask your own question.