Key facts
How does a password input behave?
A password input works like a text field, but each character is drawn as a dot. The value is sent as plain text, so only HTTPS keeps it private on the way to the server.
| Fact | Detail |
|---|---|
| Shown on the page | As dots or bullets, one per character typed. |
| Submitted value | Plain text, exactly as typed. Masking does not encrypt it, so HTTPS is required. |
| Line breaks | Removed from the value, like a text input. |
| Validation | Only what you add: required, minlength, maxlength and pattern. |
autocomplete | Use current-password on sign-in and new-password on sign-up. See the autocomplete attribute. |
| Show-password toggle | Switch the input's type to text with JavaScript, then back to password. |
| HTTP pages | Browsers warn people when a password field sits on a page served over plain HTTP. |
Sources: WHATWG HTML Standard: Password state (type=password) · MDN: <input type="password">




