Fix guide · updated 2026-11-15
Supabase "Unable to validate email address: invalid format"
AuthApiError: Unable to validate email address: invalid format · validation_failed · 400
A user types their email, and Supabase answers "Unable to validate email address: invalid format". The address looks perfect on screen. Or every sign-up fails with it, whatever anyone types. We tested Supabase's own email rule against the usual suspects: here's what it rejects, what it lets through, and how to clean the address before you send it.
What the error means
We read the email check in Supabase Auth (internal/api/mail.go). Before a sign-up or a magic link, Supabase lowercases the address and tests it against the format rule of a Go library called checkmail. If the address fails, the answer is HTTP 400, code validation_failed, "Unable to validate email address: invalid format". Two neighbours share the code: "An email address is required" when it's empty, and "An email address is too long" past 255 characters.
Upper case is never the problem. Here's what we found by running the same rule on common inputs:
- Rejected: accented letters anywhere (
josé@…,…@bücher.de), invisible characters (a zero-width space or a non-breaking space from a copy-paste),mailto:in front, two@, a dot just before the@, two dots in a row, a comma instead of a dot, two addresses in one field, and the textundefinedor[object Object]. - Accepted: ordinary spaces before or after the address,
+tags, long domains, and evenuser@localhost. So a plain extra space isn't what's failing.
1. Every sign-up fails: your code sends the wrong thing
If nobody can sign up, look at what your form really sends. A frequent bug in generated code is passing the whole form, an event or a missing value where the email should be. JavaScript turns those into the text [object Object] or undefined, which Supabase rejects:
// wrong: the form object, not the address
await supabase.auth.signUp({ email: form, password });
// right
await supabase.auth.signUp({ email: form.email, password });
Log JSON.stringify(email) just before the call: the quotes show exactly what goes out.
2. Some users fail: something invisible in the address
Addresses copied from a PDF, a chat or a web page often carry a zero-width space or a non-breaking space, and a copied link can bring mailto: along. Nobody sees them, Supabase does. Clean the field before you send it:
const cleanEmail = email
.replace(/[-]/g, '') // zero-width characters
.trim() // spaces, including non-breaking ones
.replace(/^mailto:/i, '');
await supabase.auth.signUp({ email: cleanEmail, password });
3. The address has accents
Supabase's rule only accepts plain ASCII letters. An accent before the @ can't be used with Supabase Auth at all; ask for another address. A domain with accents works in its encoded form, which the browser gives you: new URL('https://bücher.de').hostname returns xn--bcher-kva.de, so name@xn--bcher-kva.de passes.
4. A typo the form didn't catch
Two @, a comma for a dot, name.@gmail.com, gmail..com: real typos. Use <input type="email"> so the browser flags most of them before the request, and show Supabase's message in plain words: "This email address doesn't look right. Check it for typos."
If an AI tool built your app
Give your AI tool this prompt:
In every form that sends an email address to Supabase auth (sign-up, sign-in, magic link, password reset), make sure the value sent is the email string itself, not the form object or an event. Before sending, remove zero-width characters, trim spaces, and remove a leading "mailto:". Use input type="email". When Supabase returns the error code validation_failed, show "This email address doesn't look right. Check it for typos." Don't change anything else.
Not quite your error?
- The address is shaped right but Supabase answers Email address "x" is invalid: Supabase "Email address is invalid".
- The address is fine but sending fails: Supabase "Error sending confirmation email".
- Too many emails: Supabase "email rate limit exceeded".
- The address already has an account: Supabase "User already registered".
Still stuck?
Copy the exact address from your Auth logs or from your own log line into a tool that shows every character's code (or run [...email].map(c => c.codePointAt(0).toString(16)) in the browser console). Anything above 7e is a character outside plain ASCII, and that's your culprit.
Other Supabase problems? See Supabase fixes.