A production-ready Email Validator web application built with Next.js 14, TypeScript, and Tailwind CSS. Featuring advanced validation, SMTP verification, and comprehensive API support.
- Syntax Validation - RFC 5322 compliant email format checking
- Domain Validation - Check if domain exists and is valid
- MX Record Lookup - Verify mail server exists via DNS
- Disposable Email Detection - Block temporary/throwaway emails (500+ domains)
- Role-Based Detection - Identify emails like admin@, support@, info@
- Free Provider Detection - Identify Gmail, Yahoo, Outlook, etc.
- Typo Suggestions - Suggest corrections for common mistakes
- SMTP Verification - Verify mailbox existence via SMTP handshake
- DMARC/SPF/DKIM Check - Email authentication validation
- Domain Reputation - Check domain reputation scores
- Gravatar Detection - Detect if email has associated Gravatar profile
- Custom Blacklists - Create and manage your own domain/email blacklists
- Single email validation with detailed results
- Bulk validation (CSV/TXT upload or paste)
- Real-time validation as you type
- Export results to CSV or JSON
- Validation history (localStorage)
- Dark/Light mode
- Mobile responsive
- PWA Support - Install as app, offline functionality, push notifications
- Internationalization - English and Arabic with RTL support
- Keyboard Shortcuts - Navigate and control with keyboard (press
?for help) - Email List Cleaning - Deduplicate, normalize, and merge email lists
- Google Contacts Import - Import contacts directly from Google
- Webhook Notifications - Get notified on validation events
- API Usage Dashboard - Track and visualize API usage
- Node.js SDK - Official Node.js/TypeScript SDK
- Python SDK - Official Python SDK with async support
POST /api/validate- Validate single emailPOST /api/validate-bulk- Validate multiple emailsGET /api/health- API health checkPOST /api/webhooks- Manage webhooksGET /api/analytics- API usage analyticsGET /api/google/contacts- Fetch Google contacts
Clean interface for single email validation
Full dark mode support for comfortable viewing
Detailed validation results for valid emails
Clear feedback for syntax errors
Detection of temporary/disposable email addresses
Identification of role-based email addresses
Smart suggestions for common email typos
Validate multiple emails at once
Comprehensive results for bulk validation
- Framework: Next.js 14 (App Router)
- Language: TypeScript (strict mode)
- Styling: Tailwind CSS
- Components: Custom components inspired by shadcn/ui
- State Management: Zustand
- Animations: Framer Motion
- Validation: Zod
- Forms: React Hook Form
- Icons: Lucide React
- Testing: Jest, React Testing Library, Playwright
- Authentication: NextAuth.js (Google OAuth)
- i18n: next-intl
- Node.js 18+
- npm or yarn
- Clone the repository:
git clone https://github.com/mahmoodhamdi/Email-Validator.git
cd Email-Validator- Install dependencies:
npm install- Set up environment variables (optional for Google Contacts):
cp .env.example .env.local
# Edit .env.local with your Google OAuth credentials- Run the development server:
npm run dev- Open http://localhost:3000 in your browser.
npm run build
npm startRun with Docker:
# Pull from GitHub Container Registry
docker pull ghcr.io/mahmoodhamdi/email-validator:latest
# Run the container
docker run -p 3000:3000 ghcr.io/mahmoodhamdi/email-validator:latestOr use Docker Compose:
# Build and run
docker-compose up -d
# Stop
docker-compose downBuild locally:
# Build the image
docker build -t email-validator .
# Run the container
docker run -p 3000:3000 email-validatorA standalone CLI tool is available for command-line email validation:
# Install globally
npm install -g @email-validator/cli
# Or run from the cli directory
cd cli
npm install
npm run build
# Validate single email
email-validator validate test@example.com
# Validate multiple emails
email-validator validate test1@example.com test2@gmail.com
# Bulk validation from file
email-validator bulk emails.txt
# Output as JSON
email-validator validate test@example.com --format json
# Output as CSV
email-validator bulk emails.txt --format csv --output results.csv| Command | Description |
|---|---|
validate <emails...> |
Validate one or more emails |
bulk <file> |
Validate emails from a file (one per line) |
--format <type> |
Output format: text, json, or csv |
--output <file> |
Save output to file |
--help |
Show help |
npm install @email-validator/sdkimport { EmailValidator } from '@email-validator/sdk';
const validator = new EmailValidator({
apiKey: 'your-api-key',
baseUrl: 'https://your-domain.com'
});
// Single validation
const result = await validator.validate('test@example.com');
console.log(result.isValid, result.score);
// Bulk validation
const results = await validator.validateBulk([
'test1@example.com',
'test2@gmail.com'
]);
// With webhook
await validator.validate('test@example.com', {
webhookUrl: 'https://your-webhook.com/callback'
});pip install email-validator-sdkfrom email_validator_sdk import EmailValidator
validator = EmailValidator(
api_key='your-api-key',
base_url='https://your-domain.com'
)
# Single validation
result = validator.validate('test@example.com')
print(result.is_valid, result.score)
# Bulk validation
results = validator.validate_bulk([
'test1@example.com',
'test2@gmail.com'
])
# Async support
import asyncio
from email_validator_sdk import AsyncEmailValidator
async def main():
async with AsyncEmailValidator(api_key='your-api-key') as validator:
result = await validator.validate('test@example.com')
print(result)
asyncio.run(main())Import our Postman collection for easy API testing:
- Download the collection from
postman/email-validator.postman_collection.json - Import into Postman
- Set up environment variables:
baseUrl: Your API base URLapiKey: Your API key (if required)
The collection includes:
- All API endpoints with examples
- Pre-request scripts for authentication
- Test scripts for response validation
- Environment variable templates
Press ? anywhere to see all available keyboard shortcuts.
| Shortcut | Action |
|---|---|
? |
Show shortcuts help |
Ctrl + K |
Focus search/input |
Ctrl + Enter |
Submit validation |
Ctrl + B |
Go to bulk validation |
Ctrl + H |
Go to history |
Ctrl + D |
Toggle dark mode |
Escape |
Close modals |
The app supports multiple languages:
- English (default)
- Arabic (with RTL support)
Toggle language from the header. Language preference is persisted.
Install the app on your device:
- Open in browser
- Click "Install" when prompted (or use browser menu)
- Access offline functionality
- Receive push notifications for webhooks
This project uses GitHub Actions for continuous integration and deployment:
-
CI Pipeline: Runs on every push and PR
- Linting and type checking
- Unit tests with coverage
- E2E tests with Playwright
- Build verification
-
Docker Pipeline: Runs on push to main
- Builds multi-architecture images (amd64, arm64)
- Pushes to GitHub Container Registry
- Pushes to Docker Hub (if configured)
-
Release Pipeline: Runs on version tags
- Creates GitHub releases
- Generates changelog
This project includes comprehensive tests:
Unit tests cover all validators, hooks, and stores.
# Run all unit tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverageIntegration tests verify API routes work correctly.
# Integration tests are included in the main test suite
npm testEnd-to-end tests using Playwright verify the complete user experience.
# Install Playwright browsers (first time only)
npx playwright install
# Run E2E tests
npm run test:e2e
# Run E2E tests with UI
npm run test:e2e:ui| Category | Tests | Status |
|---|---|---|
| Validators | 196+ | ✅ Passing |
| Hooks | 20+ | ✅ Passing |
| Stores | 15+ | ✅ Passing |
| API Routes | 25+ | ✅ Passing |
| Components | 100+ | ✅ Passing |
| E2E | 20+ scenarios | ✅ Passing |
curl -X POST https://your-domain/api/validate \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com"}'curl -X POST https://your-domain/api/validate-bulk \
-H "Content-Type: application/json" \
-d '{"emails": ["test1@example.com", "test2@gmail.com"]}'curl -X POST https://your-domain/api/validate \
-H "Content-Type: application/json" \
-d '{"email": "test@example.com", "smtp": true}'{
"email": "test@example.com",
"isValid": true,
"score": 85,
"deliverability": "deliverable",
"risk": "low",
"checks": {
"syntax": { "valid": true, "message": "Email syntax is valid" },
"domain": { "valid": true, "exists": true, "message": "Domain format is valid" },
"mx": { "valid": true, "records": ["mx1.example.com"], "message": "Found 1 MX record(s)" },
"disposable": { "isDisposable": false, "message": "Not a disposable email domain" },
"roleBased": { "isRoleBased": false, "role": null },
"freeProvider": { "isFree": false, "provider": null },
"typo": { "hasTypo": false, "suggestion": null },
"smtp": { "valid": true, "message": "Mailbox exists" },
"authentication": {
"spf": true,
"dmarc": true,
"dkim": true,
"score": 100
},
"reputation": { "score": 95, "status": "good" },
"gravatar": { "hasGravatar": true, "profileUrl": "..." }
},
"timestamp": "2024-01-01T00:00:00.000Z"
}src/
├── app/ # Next.js App Router pages
│ ├── api/ # API routes
│ │ ├── validate/ # Email validation
│ │ ├── webhooks/ # Webhook management
│ │ ├── analytics/ # Usage analytics
│ │ └── google/ # Google contacts
│ ├── bulk/ # Bulk validation page
│ ├── history/ # History page
│ ├── api-docs/ # API documentation page
│ ├── tools/ # Tools (list cleaning)
│ └── import/ # Import (Google contacts)
├── components/
│ ├── ui/ # UI components (button, input, card, etc.)
│ ├── email/ # Email validation components
│ ├── layout/ # Layout components (header, footer)
│ ├── cleaning/ # List cleaning components
│ ├── google/ # Google integration components
│ ├── shortcuts/ # Keyboard shortcuts components
│ ├── webhooks/ # Webhook management components
│ └── providers/ # Context providers
├── lib/
│ ├── data/ # Data files (disposable domains, etc.)
│ ├── validators/ # Validation logic
│ ├── cleaning/ # List cleaning logic
│ ├── google/ # Google API integration
│ ├── auth/ # Authentication configuration
│ └── i18n/ # Internationalization
├── hooks/ # Custom React hooks
├── stores/ # Zustand stores
├── types/ # TypeScript types
└── messages/ # Translation files
├── en.json
└── ar.json
cli/ # Standalone CLI tool
postman/ # Postman collection
sdk/ # SDK packages
├── nodejs/
└── python/
# Required for Google Contacts Import
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
NEXTAUTH_SECRET=your-nextauth-secret
NEXTAUTH_URL=http://localhost:3000
# Optional
SMTP_TIMEOUT=5000
REPUTATION_API_KEY=your-api-key- v2.0.0 - Advanced validation, APIs, SDKs, PWA, i18n, and more
- v1.0.0 - Initial release with core validation features
This project is licensed under the MIT License - see the LICENSE file for details.
Mahmood Hamdi
- GitHub: @mahmoodhamdi
- Email: mwm.softwars.solutions@gmail.com
- Email: hmdy7486@gmail.com
- Phone: +201019793768
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you have any questions or need help, feel free to reach out via email or open an issue on GitHub.

