Limited supportUse with care and provide a fallback when broad support matters.

Overview

The autocorrect global HTML attribute controls whether to automatically correct spelling or punctuation errors for user input. It is most useful when native HTML semantics or browser capabilities can replace custom implementation work.

Browser support

Feature Desktop Mobile
Chrome
Edge
Firefox
Safari
Chrome Android
Safari iOS
136
14.1
14.5
DOM API

The autocorrect property of the HTMLElement interface controls whether or not autocorrection of editable text is enabled for spelling and/or punctuation errors.

136
14.1
14.5
1+Supported (version) Not supported Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)

Syntax

HTML
<input type="text" autocorrect="off" placeholder="コード入力">
<textarea autocorrect="on">Standard text input</textarea>

Live demo

Writing versus code

Keep autocorrect on for prose and off for usernames, tags, or code-like input.

PreviewFullscreen

Form policy examples

Show where spelling help is useful and where it creates noise.

PreviewFullscreen

Editable note board

Compare autocorrect support in two editable surfaces with different writing goals.

PreviewFullscreen

Use cases

  • Use autocorrect

    Use autocorrect when standard HTML needs a more specific platform feature, semantic signal, or browser capability.

  • Handle edge cases

    Apply autocorrect to solve a focused requirement without redesigning the whole page architecture.

Cautions

  • Test autocorrect in your target browsers and input environments before depending on it as a primary behavior.
  • Provide a fallback path or acceptable degradation strategy when support is still limited.

Accessibility

  • Make sure autocorrect supports the intended task without making the page harder to perceive, understand, or operate.

Powered by web-features