Every form field where someone types a proper noun or a code should have autocorrect="off". The attribute became Baseline Newly available in September 2026, so it is now a documented, detectable part of HTML in Chrome, Edge, Firefox, and Safari, and there is no good reason left to let a phone keyboard swap a person's last name for a dictionary word.
Just as important is where you leave it alone. Autocorrect is a helpful feature in the fields where people write sentences, and switching it off everywhere trades one annoyance for another.
What autocorrect actually does
Autocorrect is the feature that replaces a word while you type. You type a word the system doesn't recognize, hit space, and it becomes the closest word it does recognize. It mostly shows up on virtual keyboards, plus things like text replacement on macOS. MDN is clear that the exact behavior "depends on the user agent and the services provided by the underlying device."
It is easy to mix this up with two neighbors. spellcheck only marks words it thinks are wrong, usually with a red squiggle, and leaves the text alone. autocapitalize decides when a virtual keyboard switches to capital letters. Each one is a separate attribute, and each one needs its own decision.
The autocorrect attribute takes two values. on (or an empty string) allows correction, and off turns it off. Editable elements default to on. Three input types, email, url, and password, are always treated as off, so the browser already protects those for you.
What changed this fall
Safari has supported autocorrect since 2021, and Firefox added it in version 136 in March 2025. Chrome was the holdout in a strange way. Its Intent to Ship says the attribute "has been implemented long ago," but it was never exposed in the browser's IDL, so "autocorrect" in HTMLElement.prototype returned false and feature detection said Chrome didn't support it. Chrome fixed that in a late summer 2026 release, and the web-features project marks the feature Baseline Newly available as of September 11, 2026.
There was a second fix earlier in the year. Before Chrome 148, the Windows touch keyboard ignored autocorrect="off" and corrected words anyway. Chrome 148 now detects those corrections and reverts them when the focused field has autocorrect turned off. Android already honored the attribute.
Keep one caveat in mind. This is still a request to the operating system and the keyboard. You can't promise every keyboard on every device will listen. What you can do is ask correctly, and the major engines now pass that request along.
The fields that need it
Here is a typical contact form. It has proper labels and good autocomplete tokens, which is better than a lot of forms out there.
<form action="/contact" method="post">
<label for="given-name">First name</label>
<input id="given-name" name="given-name" type="text" autocomplete="given-name">
<label for="family-name">Last name</label>
<input id="family-name" name="family-name" type="text" autocomplete="family-name">
<label for="street">Street address</label>
<input id="street" name="street" type="text" autocomplete="address-line1">
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email">
<label for="message">Message</label>
<textarea id="message" name="message"></textarea>
<button type="submit">Send</button>
</form>
The name and street fields are the problem. Names and street names are exactly the words a keyboard dictionary doesn't know, so they are exactly the words it tries to fix. Here is the same form with the fix.
<form action="/contact" method="post">
<label for="given-name">First name</label>
<input id="given-name" name="given-name" type="text" autocomplete="given-name"
autocorrect="off" spellcheck="false">
<label for="family-name">Last name</label>
<input id="family-name" name="family-name" type="text" autocomplete="family-name"
autocorrect="off" spellcheck="false">
<label for="street">Street address</label>
<input id="street" name="street" type="text" autocomplete="address-line1"
autocorrect="off" spellcheck="false">
<label for="email">Email</label>
<input id="email" name="email" type="email" autocomplete="email">
<label for="message">Message</label>
<textarea id="message" name="message"></textarea>
<button type="submit">Send</button>
</form>
I added spellcheck="false" to the same fields. A red squiggle under someone's own name is noise, and MDN points out that spellchecking can send field content to a third party, which is another reason to skip it on personal data. The email field gets nothing new because the browser already treats it as off. The message box keeps autocorrect, because that is where people type sentences and want help typing them.
The same thinking applies beyond names. Usernames, ZIP codes, confirmation numbers, part numbers, and permit or case IDs all deserve autocorrect="off". If the value isn't a word from a dictionary, the dictionary shouldn't touch it.
Don't turn it off for the whole form
You can put autocorrect="off" on the <form> element, and its fields inherit the value. That is tempting, and it is the wrong move for most forms. It quietly turns off correction in the comment box too, where plenty of people depend on it. Someone typing with a tremor or on a small phone screen gets real value from autocorrect. Set it per field, and only where the content isn't regular words.
autocorrect doesn't replace autocomplete
If you work on WCAG compliance, don't mix these up. Success Criterion 1.3.5, Identify Input Purpose, is Level AA and asks that the purpose of fields collecting information about the user be programmatically determinable. The autocomplete tokens like given-name and family-name are how you meet it. autocorrect does nothing for that criterion. A good name field gets both attributes, each doing its own job.
Audit a page in the console
Here is a quick script you can paste into DevTools. It finds fields whose autocomplete token says they hold a name, address, username, or code but still have autocorrect on.
const personal = new Set([
"name", "given-name", "family-name",
"street-address", "address-line1", "address-line2",
"postal-code", "username", "one-time-code",
]);
const needsFix = [...document.querySelectorAll("input, textarea")].filter(
(field) => personal.has(field.autocomplete) && field.autocorrect
);
console.table(needsFix.map((field) => ({ id: field.id, autocomplete: field.autocomplete })));
Notice that field.autocorrect is a boolean, not a string. The property reflects the attribute as true or false, and that leads to a sneaky bug. If you write field.autocorrect = "off" in JavaScript, the string "off" is truthy, so the browser sets the attribute to on. Use field.autocorrect = false in scripts, or setAttribute("autocorrect", "off") if you prefer to think in attribute values.
Wrapping up
Add autocorrect="off" to every field that holds a name, an address, or a code, and pair it with spellcheck="false" while you're there. Leave it on for prose fields and never blanket the whole form. It's a small fix that keeps people's own names from getting rewritten, and now it is part of HTML everywhere.
Sources
- autocorrect HTML global attribute (MDN)
- HTMLElement: autocorrect property (MDN)
- spellcheck HTML global attribute (MDN)
- autocapitalize HTML global attribute (MDN)
- HTML autocomplete attribute (MDN)
- autocorrect (web-features explorer)
- New to the web platform in August (web.dev)
- Chrome 152 release notes
- Intent to Ship: Expose the 'autocorrect' global html attribute (blink-dev)
- Intent to Ship: Respect autocorrect="off" for Windows touch keyboard in TSF (blink-dev)
- Understanding SC 1.3.5: Identify Input Purpose (W3C)
Want the next post as soon as it's up?
On iPhone and iPad, notifications work once the blog is on your Home Screen.
- Tap the Share button in Safari.
- Choose Add to Home Screen, then Add.
- Open Off by One from your Home Screen and tap Get notified of new posts.