how many characters are possible in an input field in html?

What is the "natural" number of allowed characters in an input field in html?

thanks a lot

addition due to the comments

i don't need to send it to the server via post or get. i am going to parse the string via JS.

So if the input is unlimited like @sAc says brings me to two further questions:

  1. What is the longest String JS can handle?
  2. what is the lowest amount of allowed characters for an input in common browsers?(which would be my limit than)

Firefox 3.6.6 on my 32 bit Win 7 machine becomes slow after 1,000,000 characters and totally freezes after 4,000,000.

Chrome crashes somewhere after 8,000,000.

IE8 crashes somewhere after 8,000,000.

Safari crashes somewhere after 2,000,000.

In my testing Chrome/IE8/Safari don't slow down as the size goes up the way Firefox does.


When the type attribute has the value "text" or "password", this attribute specifies the maximum number of characters the user may enter. This number may exceed the specified size, in which case the user agent should offer a scrolling mechanism. The default value for this attribute is an unlimited number.

Source: http://www.w3.org/TR/html401/interact/forms.html#adef-maxlength