# \[spellcheck\]

> The `spellcheck` HTML attribute enables or disables spell checking for text content within an element.

## How do I turn off spell check on an input in HTML?

The attribute that enables or disables spell checking for editable content, such as `<input>`, `<textarea>` or `contenteditable` elements. When enabled, the browser underlines misspelled words.

- Topic: Global Attributes
- Type: attribute
- Browser support: Chrome 9+, Chrome Android 47+, Edge 12+, Firefox 2+, Firefox Android 57+, Safari 5.1+, Safari iOS 9.3+

## Example

Wrong:

```html
<label for="key">API key</label>
<input id="key" name="api_key" spellcheck="off">
```

Right:

```html
<label for="key">API key</label>
<input id="key" name="api_key" spellcheck="false">
```

`spellcheck` takes 'true' or 'false', so 'false' turns the red underlines off.

## Common mistakes

- Writing `spellcheck='off'`, which is not a valid value.
- Leaving red underlines on code editors and token fields.

## Key points

- Fields for codes, emails, usernames and passwords set `spellcheck='false'`.
- Values are 'true' or 'false', not 'on' or 'off'.
- Long free-text fields like comments keep spell check on.

## Interview questions

### Is spellcheck a boolean attribute?

No. It is enumerated, so `spellcheck='false'` turns it off. An empty value means 'true'.

### Is spellcheck the same as autocorrect?

No. Spell check only marks words. Autocorrect changes them as the user types.

### Does spellcheck work on contenteditable elements?

Yes. It applies to editable text, including `<textarea>`, text inputs and `contenteditable` regions.

## Related cards

- [\[autocorrect\]](https://wonderium.dev/html/autocorrect.md)
- [\[autocapitalize\]](https://wonderium.dev/html/autocapitalize.md)
- [`<input>`](https://wonderium.dev/html/input.md)
- [`<textarea>`](https://wonderium.dev/html/textarea.md)
- [\[contenteditable\]](https://wonderium.dev/html/contenteditable.md)

---

- Level: [HTML](https://wonderium.dev/html.md)
- HTML version: https://wonderium.dev/html/spellcheck
- Last updated: 2026-11-25
