The autocorrectglobal attribute tells supporting browsers whether to automatically correct spelling while the user edits text. Use on for natural-language fields and off for codes, names, or tokens that must stay exact.
It complements spellcheck (marking possible errors) and autocapitalize (capitalization hints). Autocorrect may change the typed characters; spellcheck usually only highlights them.
Progressive enhancement.
Platforms that lack autocorrection simply ignore the attribute. Always design so the field still works without it.
Hints, not guarantees.
Even with autocorrect="on", the OS keyboard settings can override or disable automatic corrections.
Syntax
HTML Syntax
syntax.html
<element autocorrect="on|off">
Works as a global attribute. Effects appear on editable text when the browser and OS support spelling autocorrection.
Values
Attribute Values
Enumerated keywords:
Value
Description
Try it
on
Allow automatic spelling corrections when supported
Edit the box on a supporting mobile browser to feel autocorrect.
How It Works
Mark editable.contenteditable="true" makes the region accept typing.
Add autocorrect. Supporting platforms may fix spelling as you type.
Label accessibly. Use role and aria-label (or a visible label).
Test on device. Desktop editors may not autocorrect even when the attribute is present.
Edge Cases & Pitfalls
Autocorrect is a soft hint — field type and OS settings still win.
vs spellcheck
Different jobs
spellcheck marks possible mistakes; autocorrect may rewrite them. Set both deliberately on sensitive fields.
mobile
Desktop may ignore it
Many desktop browsers never autocorrect. Do not rely on it for correctness — validate on the server.
privacy
Sensitive text
Prefer off for secrets, medical notes, or anything that should not leave the device via a cloud keyboard feature.
names
Proper nouns
Names and brand spellings often get “fixed” incorrectly — disable autocorrect on those inputs.
Compatibility
Browser Support
autocorrect is an HTML attribute for browsers. It is not a Node.js, Deno, or Bun API.
✓ Limited · Progressive enhancement
autocorrect
Best supported in Safari/WebKit; other engines are catching up. Always treat as optional.
70%Global support (approx.)
Google ChromeModern (growing)
Full support
Mozilla FirefoxLimited / none
Limited
Apple SafariYes
Full support
Microsoft EdgeModern (growing)
Full support
OperaModern
Full support
Samsung InternetModern
Full support
Internet ExplorerNo support
Not supported
autocorrectPartial / growing
Bottom line: Safe to set for better mobile UX. Never depend on autocorrect for data quality.
Remember
Key Takeaways
Role: hint whether spelling may be auto-fixed while typing.
Values:on or off.
Codes: turn it off for tokens, usernames, and IDs.
Not spellcheck: autocorrect rewrites; spellcheck highlights.
One line:autocorrect asks the keyboard to fix spelling — or leave the text alone.
Frequently Asked Questions
It hints whether the browser or OS may automatically correct spelling as the user types in editable text. Typical values are on and off.
No. spellcheck controls whether spelling may be underlined or checked. autocorrect controls whether the browser may rewrite the text for you.
It is a global attribute, but the effect shows on editable content — text-like inputs, textarea, and contenteditable regions — when the platform supports autocorrection.
Often no or weakly. Effects are most noticeable on mobile virtual keyboards and platforms that already autocorrect.
Yes. Disable it for usernames, invite codes, API keys, and other fields where automatic spelling changes would corrupt the value.
Support is strongest in Safari/WebKit and growing elsewhere. Treat it as a progressive enhancement and pair with spellcheck when needed.