List Cleaner: Remove Duplicates and Extract Emails

Paste a one-per-line list to drop duplicates and blank lines, sort it and format it for a SQL IN() clause.

Deduplicating an email list and preparing it for a SQL IN()

The tool handles a one-item-per-line list: it trims spaces and empty lines, applies the chosen letter case, removes duplicates regardless of capitals, sorts, then joins the result as lines, a comma- or semicolon-separated list, or a SQL IN (…) clause. From the 9-address sample list, 6 unique emails remain. For a table with several columns, use the table converter instead.

Processing, step by step

  1. Split by line, then trim leading and trailing spaces and drop empty lines (both options ticked by default).
  2. Letter case: lower (default), upper, capitalised first letter of each word, or unchanged.
  3. Deduplication: the first occurrence is kept and the comparison always ignores capitals.
  4. Sort: A→Z (default), Z→A, by length or original order. A→Z sorting reads numbers as numbers: ref-2 comes before ref-10.
  5. Prefix and suffix added to each item, then joining and, if you set a batch size, splitting into chunks.

Example

The sample list has 9 lines, including CAMILLE.BERNARD@CORP.FR in capitals and an address padded with spaces. After cleaning: 6 unique items, 3 duplicates removed. With SQL IN() output you get IN ('alexandre.dubois@acme.com', 'camille.bernard@corp.fr', 'julie.petit@agency.com', 'lucas.moreau@startup.co', 'sarah.martin@company.org', 'thomas.leroy@tech.io'), with apostrophes doubled. With batches of 500, a list of 1,200 addresses gives 3 chunks, handy for a mailing tool or a database that limits the size of an IN().

Extraction

The extraction buttons replace the pasted text with the email addresses or URLs (starting with http or https) found in it, one per line, which helps clean a raw export or the body of a message.

Limits found in the code

  • The "duplicates removed" counter includes deleted empty lines.
  • No case-sensitive deduplication and no check that addresses exist.

Frequently Asked Questions

How do I remove duplicates from an email list?

Paste the list, one address per line: the tool trims spaces, lowercases everything and keeps only the first occurrence of each address, ignoring capitals. The counters show the original lines, duplicates removed and unique items, for example 9, 3 and 6 for the sample list.

How do I turn a list into a SQL IN clause?

Choose the SQL IN() output: each item is wrapped in single quotes, inner apostrophes are doubled (O'Neil becomes O''Neil) and the whole list is wrapped in IN ( … ). Then paste the clause after WHERE column.

How do I extract email addresses from text?

Paste the raw text and click "Extract all emails": the text is replaced by the addresses found, one per line, which you can then deduplicate. Addresses containing a + sign (jean+news@example.com) are extracted in full.

How do I split a long list into batches?

Enter a batch size, for example 500: the cleaned list is cut into consecutive chunks of 500 items, the last one holding the remainder. 1,200 addresses thus give 3 batches of 500, 500 and 200.

Is this tool really free?

Yes, all tools on Kristools are 100% free and accessible without registration.

Is my data protected?

Yes. All processing is performed directly and securely inside your browser. No personal data is sent to our servers.