Key facts
How does a hidden input behave?
A hidden input is never drawn and never takes focus, but if it has a name and isn't disabled, its value is sent with the form as name=value, exactly like a text field.
| Fact | Detail |
|---|---|
| Shown on the page | No. It takes up no space, can't be focused and is skipped by the Tab key. |
| Sent with the form | Yes, as name=value, when it has a name and isn't disabled. |
| Validation | None. Hidden inputs are barred from constraint validation, so required and pattern are ignored. |
| Changing the value | Set input.value in JavaScript. On a hidden input this also updates the value attribute. |
name="_charset_" | Special: with no value, the browser sends the form's character encoding, such as UTF-8. |
| Security | None. The value is in the page source and can be edited before submit, so check it on the server. |
Sources: WHATWG HTML Standard: Hidden state (type=hidden) · MDN: <input type="hidden">




