User Agents

Web browsers and everyday web tech, explained

Maximum URL Length by Browser: Real Limits

· 7 min read · How the Web Works

In this article
  1. Why Browsers Have URL Length Limits
  2. Exact Limits by Browser (as of 2024)
  3. Server-Side Limits: The Real Bottleneck
  4. What Happens When You Exceed a Limit?
  5. How to Handle Long URLs in Practice
  6. Common Misconceptions About URL Length
  7. Frequently Asked Questions

The practical maximum length of a URL you can type or paste into a browser is not a single number. Different browsers, servers, and proxies each impose their own limits, and the one that matters most is the one you hit first. In short: Microsoft Edge and Google Chrome cap URLs at about 2,083 characters (they share the same underlying engine), Firefox allows up to 65,536 characters, and Safari does not enforce a documented limit but effectively stops working reliably somewhere around 80,000 characters. However, the far more common constraint is the web server: Apache's default limit is 8,192 characters, and nginx defaults to 8,192 as well, so a URL that works in your browser may still fail when the server rejects it. This article explains those limits in detail, why they exist, and what happens when you exceed them.

Why Browsers Have URL Length Limits

URL length limits are not arbitrary. They come from three sources: the HTTP specification, the software that handles requests, and the practical need to prevent abuse.

  • HTTP/1.1 specification (RFC 7230) does not set a maximum URL length, but it does say that servers should handle any URL they can parse. This leaves the decision to implementers.
  • Server software (Apache, nginx, IIS) sets its own limits to protect against buffer overflows and denial-of-service attacks. A URL longer than the server's limit returns a 414 URI Too Long error.
  • Browser engines impose their own caps for memory and performance reasons, especially when storing history, syncing tabs, or sharing URLs.

In practice, the limit you hit is almost always the server's, not the browser's. For example, if you try to open a 10,000-character URL in Chrome, the browser will happily send it, but any Apache server will reject it with a 414 error.

Exact Limits by Browser (as of 2024)

Here are the documented limits for the major desktop browsers. Mobile browsers generally inherit the same limits as their desktop counterparts, though some older versions may differ.

  • Chrome (desktop and Android): 2,083 characters for the URL bar input, but the internal limit for the HTTP request line is 2,083 characters as well. This is a hard cap inherited from the old WebKit engine.
  • Edge: Same as Chrome, because Edge is built on Chromium. The limit is 2,083 characters.
  • Firefox: 65,536 characters. This is the maximum length of the HTTP request line that Firefox will send. In practice, you can paste a much longer URL, but the browser will truncate it when sending.
  • Safari: No documented limit. Safari uses WebKit, which does not impose a specific cap, but in testing, URLs longer than about 80,000 characters cause the browser to slow down or fail to load. Apple does not publish a number.
  • Opera: Since Opera is also Chromium-based, it shares the 2,083-character limit.

These are the numbers you will see cited most often. However, they are not the whole story. The browser's URL bar may accept longer strings, but the actual HTTP request may be truncated or rejected. For instance, Chrome's address bar will let you type more than 2,083 characters, but when you press Enter, the request is cut off at that limit.

Server-Side Limits: The Real Bottleneck

While browsers have their own caps, the server that hosts the website is the first line of defense. Here are the common limits for popular web servers:

  • Apache: Default LimitRequestLine is 8,192 bytes. You can change it in the config, but most hosts leave it at default.
  • nginx: Default large_client_header_buffers is 8,192 bytes. This is the total size of the request line and headers.
  • IIS (Microsoft): Default limit is 16,384 bytes for the URL, but this can be configured.
  • Tomcat: Default is 8,192 bytes for the request line.

If you control the server, you can raise these limits, but doing so may expose you to attacks that flood the server with overly long requests. That is why most administrators leave them at default.

What Happens When You Exceed a Limit?

When a URL exceeds the server's limit, the server returns a 414 URI Too Long status code. The browser displays an error page. When the URL exceeds the browser's own limit, the behavior varies:

  • In Chrome and Edge, the URL is truncated to 2,083 characters before the request is sent. The page that loads may be different from what you intended, or you may get a server error if the truncated URL is invalid.
  • In Firefox, the URL is sent up to 65,536 characters. If the server has a lower limit, you get a 414 error.
  • In Safari, there is no truncation, but extremely long URLs may cause the browser to hang or fail to load.

It is also worth noting that some proxies and CDNs (like Cloudflare) have their own limits, often around 8,000 characters. So even if your browser and server allow longer URLs, an intermediary may block them.

How to Handle Long URLs in Practice

If you need to share or use a URL that is longer than the limits above, you have a few options:

  1. Use a URL shortener (like bit.ly or tinyurl) to create a short alias that redirects to the long URL. This is the most common solution.
  2. Use a POST request instead of a GET request. POST data is sent in the body of the request, which has a much higher limit (often 2 MB or more). This is the standard approach for forms that submit large amounts of data.
  3. Store the long URL in a database and reference it by an ID. This is what most web applications do for search queries or complex filters.
  4. If you control the server, increase the limit in the configuration, but be aware of the security implications.

For everyday browsing, you rarely need to worry about these limits. They only become relevant when you are building web applications or debugging why a long URL fails.

Common Misconceptions About URL Length

There are several myths about URL length that persist:

  • "Google only indexes URLs up to 2,083 characters." This is false. Google's official documentation says it can crawl URLs longer than that, but it may not index them fully. The 2,083 number comes from an old Microsoft guideline for IE, not from Google.
  • "The maximum URL length is 2,048 characters." This is a common myth derived from the old IE limit. In reality, IE had a limit of 2,083 characters, and that only applied to IE, not to all browsers.
  • "You can't use spaces in URLs." You can, but they are encoded as %20 or +. The encoded version counts toward the length limit.

Understanding the actual limits helps you avoid these misconceptions when designing web pages or debugging issues.

Frequently Asked Questions

What is the maximum URL length in Chrome?

Chrome's maximum URL length is 2,083 characters. This is a hard limit inherited from its WebKit roots. If you try to open a URL longer than that, Chrome will truncate it to 2,083 characters before sending the request.

Can I increase the URL length limit in my browser?

No, you cannot change the browser's limit. It is compiled into the browser code. However, you can increase the server-side limit if you control the server. For example, in Apache, you can change the LimitRequestLine directive.

Why do some websites have very long URLs that work?

Those websites likely use a server with a higher limit, or they use a URL structure that stays under the limit. For instance, some sites use query parameters that are short, or they use a POST request behind the scenes. Also, the URL you see in the address bar may be a shortened redirect.

Does the URL length affect SEO?

Google has stated that URL length is not a ranking factor, but very long URLs may be truncated in search results, which can affect click-through rate. Also, extremely long URLs can be harder for users to read and share. It is best to keep URLs concise and descriptive.

What is the maximum length for a URL in a tweet?

Twitter (now X) automatically shortens URLs to 23 characters using its own t.co shortener. So you can paste a very long URL in a tweet, and it will be displayed as a 23-character link. The actual long URL is still functional when clicked.

Is there a maximum length for a URL in an email?

There is no universal limit for URLs in emails. Email clients may wrap long URLs, but they remain clickable. However, some email services may have a maximum line length (often 998 characters per RFC 5322), but that applies to the raw text, and the URL is not broken if it is encoded properly.