On an HTML form, What is the maximum amount of characters that should be allowed for:

  • Street Address 1
  • Street Address 2
  • Town/Suburb
  • State/Province (I would have drop downs for main countries, but I can't list every one in the world)
  • Postal Code/Zip Code

I have left off country because it would be a drop down.

  • 4
    is there a reason why you want to restrict the number of characters? – Igor-G Feb 18 '13 at 13:38
  • Hi Igor, that is a good thought point. One use-case I can think of is where a user copies and pastes an address from another sources and might accidentally collect additional text that is not required for the field without noticing it. – fakeguybrushthreepwood Feb 18 '13 at 13:47
  • "State/Province" - please, do make sure to indicate this is optional, depending on the country. It annoys the hell out of me every time I am seemingly asked for my state when entering my address for something and I have to type in my state name because I'm not sure the website will correctly process my request if I leave that field blank, even though the state is irrelevant for postal addresses in my country. – O. R. Mapper Jul 13 '19 at 10:03

I think you should not restrict it at all (meaning: setting the limit at a very high level). It is hard, if not impossible, to determine how long the fields should be, but they cannot be too short, that's for sure. Names, cities, streets can be really long. Just check these to get some perspective:

Longest place names in the world: http://en.wikipedia.org/wiki/List_of_long_place_names

For the longest surname check: http://www.museumofhoaxes.com/hoax/weblog/permalink/worlds_longest_surname/ There is a world record on it!

The argument of not letting users paste too much is important to some extent, but I don't really think it is going to cause more problems than too short fields to enter data.

| improve this answer | |

I think the UK Government Data Standards Catalogue can be a good read for this:


" International Postal Address:

  • Max 35 characters per line;
  • Minimum of 2 lines and maximum of 5 lines for the postal delivery point details, plus 1 line for country and 1 line for postcode/zip code.


  • The Outward code can be 2, 3 or 4 characters followed by a space and the inward code, which is 3 characters and is always NAA
  • The outward code has seven valid formats, AN, ANN, AAN, AANN, ANA, AANA, and AAA
  • The letters I and Z are not used in the second alpha position (except GIR 0AA)
  • The second half of the code never uses the letters C, I, K, M, O, and V".

Anyway, just because the information is common on applications, doesn't mean that your website uses the data in the same way that other webites use it.
What are you going to do with the address? You need a fully standardized address?

| improve this answer | |

I'd make it more flexible.

Some countries do not have zip codes, or they are generally not used.

Some countries require more for location, others less (in some countries, many people don't even know the name of their own state or county).

P. O. Box needs to be separate in some cases.

In countries with other writing systems, it's sometimes necessary to have two lines for each part - because otherwise the sender's courier won't know how to get it to the courier of the recipient, or the recipient's courier can't read it.

The order of items is also different from country to country. Some have the number first and then the street name, or the opposite. Some have the zip code in front or after the city, not after the state. And so on.

There need to be fields for c/o, business name, instructions, house names (yes, some places don't have street numbers) and many more.

Banks and such usually have an easy to find address. Check the formats of the addresses for at least your most important countries.

As the number of lines is limited, make sure your form doesn't encourage people to fill something in for each option.

I'd make it like this

[             ]
[             ]
[             ]
Option4 Option5
[     ] [     ]
Option6 Option7
[     ] [     ]
Option8 Option9
[     ] [     ]
[             ]

Options to choose from would be business, name, house, P.O. Box, street1, street2, instructions (only if delivery), suburb, county, city, state, postcode, P.O. Postcode. If some turn out to be universal (Business name always on top, Name always in one of the first two lines, and so on, you can limit the choices accordingly. You can also limit them even more by letting the user choose the country first. And prefill the most likely options.

However, you probably find some address formats for which you need to add even more flexibility...

| improve this answer | |
  • "In countries with other writing systems, it's sometimes necessary to have two lines for each part" - usually, the sender's courier just needs to know the destination country, the rest needs to be handled once it's there. +1 for all the other points you list. – O. R. Mapper Jul 13 '19 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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