The accept-charset attribute on a <form> states the character encoding the server accepts for submitted data. Per the HTML specification, the only allowed value is a case-insensitive match for UTF-8.
Always declare the page itself as UTF-8 with <meta charset="UTF-8">. Browsers typically submit form data in the document encoding; accept-charset="UTF-8" makes that expectation explicit on the form.
Baseline · Widely available.
Not deprecated and not experimental. Stable on <form> across modern browsers since about July 2015.
Spec change.
Older HTML allowed several encodings (comma- or space-separated). Current HTML allows only UTF-8. Prefer UTF-8 pages and forms; do not rely on legacy encoding lists.
Syntax
HTML Syntax
syntax.html
<form accept-charset="UTF-8"> … </form>
Value is case-insensitive (utf-8 and UTF-8 both match the spec).
Values
Attribute Values
What you may put in accept-charset today — and what you may still see in old code:
Value
Description
Try it
UTF-8
The only value allowed by the current HTML specification (case-insensitive)
Page meta charset and form accept-charset both say UTF-8.
How It Works
meta charset tells the browser how to decode the HTML file.
accept-charset tells how form data should be encoded on submit.
Keep both UTF-8 so international text round-trips cleanly.
They are different attributes — do not confuse with accept (file types).
Edge Cases & Pitfalls
Most confusion is mix-ups with other charset-related attributes.
spec
Only UTF-8 is valid now
Do not list ISO-8859-1 or multiple encodings. Current HTML allows a single case-insensitive UTF-8.
page first
Serve the page as UTF-8
W3C guidance: use UTF-8 for the document. Browsers usually submit in the page encoding whether or not you set accept-charset.
not accept
Different from accept
accept filters file types. The old accept on <form> is deprecated — use file inputs instead.
scope
Form only
Putting accept-charset on an <input> has no effect. It is a form attribute.
JS
DOM property is acceptCharset
In scripts, read or set form.acceptCharset — camelCase for the same attribute.
Compatibility
Browser Support
accept-charset is an HTML form attribute in the browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
accept-charset
Widely available since about July 2015 on form elements. Use UTF-8 everywhere; legacy multi-encoding lists are obsolete in the HTML living standard.
98%Form attribute support
Google ChromeAll modern
Full support
Mozilla FirefoxAll modern
Full support
Apple SafariAll modern
Full support
Microsoft EdgeAll modern
Full support
OperaAll modern
Full support
Samsung InternetAll modern
Full support
Internet ExplorerSupported (legacy encodings possible)
Supported
accept-charsetWidely supported
Bottom line: Safe to use. Prefer UTF-8 pages and accept-charset="UTF-8". Do not depend on obsolete multi-encoding lists.
Remember
Key Takeaways
Role: declare the form submission character encoding.
Value: only UTF-8 (case-insensitive) in current HTML.
Element:<form> only — not inputs.
Also set<meta charset="UTF-8"> on the page.
One line:accept-charset="UTF-8" on the form — and serve the page as UTF-8 too.
Frequently Asked Questions
On a form, it states the character encoding the server accepts for submitted data. The HTML specification allows a single case-insensitive value: UTF-8.
Only the form element. It does not apply to input or other controls.
Yes in current HTML. Older pages sometimes listed several encodings (for example ISO-8859-1). That multi-value pattern is historical; the spec now requires UTF-8.
Yes. Serve and declare the page as UTF-8 with meta charset. Browsers submit form data in the page encoding; accept-charset documents the expected submission encoding.
No. accept filters file types on input type=file. accept-charset sets the form submission character encoding.
Use the form’s acceptCharset property, which reflects the accept-charset HTML attribute.