# Email List Cleaner

Clean pasted email lists: validate syntax, trim and lowercase, remove duplicates, flag malformed rows, and export a copy-ready list.

## Run it

- **CLI:** `gizza tool email-list-cleaner "Alice@example.com
Bob <bob@example.com>
alice@example.com
not-an-email"`
- **Web:** https://gizza.ai/tools/email-list-cleaner/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/email-list-cleaner/tool.json

## Inputs

- `emails` — Email list _(field)_
- `canonicalize` — Fold provider aliases before de-duping _(field)_
- `sort` — Output order _(field)_
- `format` — Output format _(field)_

## Output

- Cleaned emails (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `emails` — Email list
- `canonicalize` — Fold provider aliases before de-duping
- `sort` — Output order
- `format` — Output format

Example: `https://gizza.ai/tools/email-list-cleaner/?emails=Alice%40example.com%0ABob%20%3Cbob%40example.com%3E%0Aalice%40example.com%0Anot-an-email&canonicalize=true&sort=input&format=report`

---

## Clean pasted email lists before importing or sending

Use this tool when you have addresses copied from a spreadsheet, CRM export, mail header, or sign-up form and need a safer list to paste somewhere else. It splits entries on newlines, commas, and semicolons; trims whitespace; accepts `Name <addr>` and `mailto:` wrappers; lowercases the cleaned address; validates email syntax; removes duplicates; and reports malformed rows with the reason they were rejected.

The default report keeps first-seen order and shows counts for processed entries, unique valid addresses, duplicates removed, and invalid rows. Switch the output format to `clean` for one address per line or `comma` for a comma-separated list. Enable provider alias folding only when you intentionally want Gmail-style variants such as `john.doe+tag@gmail.com` and `johndoe@gmail.com` to collapse to the same canonical address.

### Worked examples

- `Alice@example.com`, `Bob <bob@example.com>`, `alice@example.com`, `not-an-email` returns two valid unique addresses, one duplicate removed, and one invalid row.
- `zeta@example.com, alpha@example.com; zeta@example.com` with `sort=alpha` and `format=clean` returns `alpha@example.com` then `zeta@example.com`.
- `john.doe+news@gmail.com`, `johndoe@gmail.com`, and `JohnDoe@googlemail.com` with provider alias folding enabled collapse to `johndoe@gmail.com`.

### Limits and edge cases

- This is a syntax and list-cleaning tool. It does not perform DNS, MX, SMTP, mailbox, or bounce verification.
- Disposable-domain checks are handled by the separate disposable-email detector tool.
- The parser accepts practical email syntax used by real mail systems; exotic quoted local parts may be accepted by the validator but not provider-canonicalized.
- Whitespace alone is not a separator, so display names like `Ada Lovelace <ada@example.com>` stay together.
- Provider alias folding can intentionally merge distinct aliases; leave it off if tags or dots matter for your workflow.

### FAQ

<details>
<summary>Does this verify that a mailbox really exists?</summary>

No. It validates address syntax and cleans the pasted list locally. Real mailbox verification requires DNS and SMTP/network checks, which are outside this browser-local tool model.

</details>

<details>
<summary>What does provider alias folding do?</summary>

When enabled, known provider rules are applied before de-duplication. For example, Gmail ignores dots in the local part and supports `+tag` aliases, so those variants collapse to one canonical address.

</details>

<details>
<summary>Will duplicates keep the first address I pasted?</summary>

Yes by default. The tool preserves first-seen order after cleaning and removes later duplicates. Choose alphabetical sort only when you want the final valid list sorted.

</details>

<details>
<summary>Can I paste comma-separated addresses from a spreadsheet or To field?</summary>

Yes. Newlines, commas, and semicolons all split entries, while spaces inside display-name wrappers are preserved.

</details>

## Related tools

- [Email Validator](https://gizza.ai/tools/email-validator/): Validate an email address against RFC 5321/5322 syntax in your browser — flags bad domains, illegal characters and typos like gmial.com. Free, no DNS lookup.
- [Extract Email Addresses](https://gizza.ai/tools/extract-email-addresses/): Pull all email addresses out of any text, deduplicated and optionally grouped by domain — in your browser. Nothing is uploaded.
- [Format Validator](https://gizza.ai/tools/format-validator/): Validate a value as an email address, URL, IPv4/IPv6 address, phone number, or credit card with Luhn check. Auto-detect formats locally in your browser.
- [Basic Auth Header Generator](https://gizza.ai/tools/basic-auth-header-generator/): Generate an HTTP Basic Authorization header from a username and password — base64(user:pass) per RFC 7617. Runs in your browser, nothing is sent, free.
- [CIDR Calculator](https://gizza.ai/tools/cidr-calculator/): CIDR calculator: get network address, broadcast, netmask, wildcard, usable host range and host count for any IPv4 or IPv6 prefix. Free, private, in-browser.
