Embeddable Email Validator Widget
Add real-time email validation to any website with one line of HTML. No dependencies, ~7KB JS (~3KB gzipped), debounced validation with score circle.
Live Demo
Type an email — try test@gmail.com, admin@company.com (role), test@mailinator.com (disposable).
Demo calls POST /v1/validate with 300ms debounce.
1-Line Embed (Recommended)
Paste anywhere in your <body>. Automatically renders an input + real-time validation.
Attach to Existing Input
Already have a form? Keep your markup and just enhance it.
JavaScript API
// Attach to existing input
EmailValidatorWidget.init('#email-input', {
apiUrl: 'https://email-validator-api.rayanbaig796.workers.dev', // default
debounceMs: 300, // ms debounce (default 300)
showScore: true, // show 0-100 score circle
onResult: (result) => {
// result = { email, valid, status, score, scoreLabel, checks, ... }
if (result.valid) enableSubmit();
}
});
// Auto-init via data attributes (no JS needed)
Options
| Option | Type | Default | Description |
|---|---|---|---|
apiUrl | string | https://email-validator-api.rayanbaig796.workers.dev | Base URL for API (no trailing slash). Widget calls POST [apiUrl]/v1/validate |
debounceMs | number | 300 | Debounce delay before validation; also read from data-debounce |
showScore | boolean | true | Show 0-100 score circle; use data-show-score="false" to hide |
onResult | function | — | Callback (data) => void with full API result or {error} |
API Result Shape
Widget uses POST /v1/validate → success with data containing email, valid, status, score, scoreLabel, checks, domain.
Frequently Asked Questions
What is the email validation widget? +
The widget is a free, embeddable email validation tool you can add to any website. It provides real-time email validation with a confidence score as users type.
How do I add the widget to my website? +
Add the widget script, CSS, and a container div to your HTML. Then call EmailValidatorWidget.init() with your input selector. The whole setup takes under 2 minutes.
Is the widget free to use? +
Yes, the widget is 100% free. There are no limits on validations, no API key required, and no hidden costs.
Can I customize the widget appearance? +
Yes, the widget supports custom styles via CSS. You can override colors, fonts, borders, and animations to match your brand.
Does the widget work with existing forms? +
Yes, the widget attaches to any existing email input field. It validates in real-time as users type and provides instant feedback.