What is the maximum number of characters for the password field on the User object?
I cannot find it in the documentation anywhere, and this question seems to imply its:
Is that correct??
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
The documentation does say that there's a limit.
User passwords cannot exceed 16,000 bytes.
The answer does not say that the maximum maximum is 1,333 characters, but rather the minimum maximum is 1,333 characters. The maximum is 16,000 characters if you use only UTF code points 0x01-0x7F, which mirror the same 127 code points in LATIN-1/ISO-8859-1 for those code points. If you used codes 0x80-0x7FF, you'd be limited to 8,000 characters, 0x800-0xFFFF would be limited to 5,333 characters, etc. So really, the answer depends on what characters you're using.
This is a fairly "new" limit. Originally, passwords were able to have over a million characters (there was "no limit"), although only when set via an API call. The 16,000 byte limit was probably set because weird things started to happen if you had really long passwords (e.g. you'd be unable to input your password on some devices).