1. Home
  2. Free tools
  3. Email list tools
  4. Email list code array converter

Email list code array converter: turn a list of emails into JSON, JavaScript, Python, PHP or a SQL IN list

In short: Paste addresses in any layout and get them as a quoted, escaped array for JSON, JavaScript, Python or PHP, or as a SQL IN list. Repeats are dropped and the output can be copied or downloaded. Limit: It reads the shape of addresses only and cannot say whether a mailbox exists.

Paste a list of emails in any layout, a column from Excel, a comma list or recipients copied from an email. Every address is read out, repeats are dropped, and you pick the output: a JSON array, a JavaScript array, a Python list, a PHP array or a SQL IN list. Quotes are escaped, so an address with an apostrophe is safe.

Price: this tool is free. Checking a whole email list is from $9/mo, and the first 100 checks are free with Google, no card. Check your list free nowSee pricing

Runs in your browser. Nothing is uploaded.
Sample result from the Email list code array converter
Show the sample result as

Sample result

Four example addresses become a JSON array, with o'brien@example.com escaped for SQL as 'o''brien@example.com'.

Addresses
4
Format
JSON array
Also
Python, PHP, SQL

What this means for you

The shape is read, not the mailbox; check the addresses before they go in code.

Next step:Verify the list
  • Any pasted layout
  • Quotes escaped
  • Five formats
  • Copy or download
  • JSON
  • SQL
  • Developers

By SimpleVerifier Team · Last updated · Runs in your browser; nothing you paste is sent to us

Putting a list in code? Check the addresses before they go in.

  1. Copy the code here, or use the check button under the result, which carries the addresses across.
  2. Upload or paste it at /verify. Every address gets a live mailbox check, and the first 100 email checks are free with a Google sign-in, no card.
Check the list

How do I convert a list of emails to an array?

  1. Paste the addresses, or upload a CSV or TXT file. Any layout works, and display names are ignored.
  2. Press Convert the list. Repeats are dropped and anything that is not an address is left out and counted.
  3. Choose the format and whether each address goes on its own line.
  4. Copy the code or download it as a file.

Example

You enter
Four lines: Ava Stone <ava@example.com>, ben@example.org; cara@example.net, o'brien@example.com and ava@example.com again.
You get
4 addresses and 1 repeat dropped. As a JSON array: ["ava@example.com", "ben@example.org", "cara@example.net", "o'brien@example.com"]. As a SQL IN list the apostrophe is doubled: 'o''brien@example.com'.
Limits
Runs in your browser; nothing is uploaded. It reads the shape of addresses only. For a query that takes user input, use your driver's parameters.

How are quotes and apostrophes handled?

An apostrophe is legal in the part of an address before the @, so o'brien@example.com is a real address that would break a naive single-quoted string. JSON uses double quotes and escapes what JSON needs. JavaScript, Python and PHP use single quotes with the backslash and the quote escaped. SQL doubles the quote, 'o''brien@example.com', which every SQL dialect reads the same way.

That makes the output safe to paste into a script or a query. For a query that takes input from other people, use your database driver's parameters instead of building the text by hand.

What does it read as an address?

It finds address-shaped text anywhere in what you paste, so Ava Stone <ava@example.com> gives ava@example.com and a semicolon list is split. Addresses are lowercased and compared as lowercase, so repeats that differ only in capitals are dropped. Text that has an @ but fails a syntax check, or looks like an image file name such as logo@2x.png, is left out and counted. To change a list's layout without code, use the email list formatter.

Where does the list go next?

Developers use these lists as a test fixture, a seed for a database, or an allowlist or blocklist in code. A list that will drive real sends should be checked first: see verify emails in a Postgres or MySQL table for the same job on a table. The email extractor pulls addresses out of longer text.

Who uses this tool, and for what?

Developers
Turn a pasted list of test users into a fixture or a seed array.
Data analysts
Build a WHERE email IN (...) clause from a column of addresses.
No-code builders
Get a JSON array to paste into an automation step that takes a list.

What can’t this tool tell you?

  • It reads the shape of addresses only and cannot say whether a mailbox exists.
  • Very long lists make long output, so the preview is cut at 20,000 characters; copy and download carry all of it.
  • Addresses are lowercased, so it is not for systems that treat the part before the @ as case-sensitive.
  • For a query that takes input from other people, use your database driver's parameters, not pasted text.

Common questions

Which formats can I get?
A JSON array, a JavaScript array, a Python list, a PHP array and a SQL IN list. Each is quoted and escaped for its language.
Does it work with a column pasted from Excel?
Yes. A column, a comma or semicolon list and recipients copied from an email are all read the same way.
Are duplicates removed?
Yes. Repeats, ignoring capital letters, are dropped and the count is shown. The first position of each address is kept.
Does it change the case of addresses?
Yes, they are lowercased. Mailboxes are treated as case-insensitive in practice, though the standard allows the part before the @ to be case-sensitive.
Is the SQL safe for a query?
It is escaped for a string literal, which is fine for a one-off query or a fixture. For code that takes input from users, use parameters.
Does it check the addresses exist?
No. It reads the shape of each address only. A mailbox check says which ones still exist.

A tidy list can still be full of dead addresses.

Extracting, deduplicating and syntax checks all work on the text of an address. None of them can tell whether the mailbox exists. Only the server that hosts it can answer that, through an SMTP check, and that is what the paid product does.

  • Upload the cleaned file as it is: CSVs up to 100,000 rows
  • A real SMTP mailbox check on every row, with catch-all detection
  • Small list? Starter at $9/mo covers 2,500 emails a month, cancel anytime

Plans from $9 a month, cancel anytime, no contract. Sign in with Google and your first 100 email checks are free, no card. The free tools stay free either way.

Clean your next list before it bounces

100 free email checks when you sign in with Google, no card. Then monthly plans from $9, or one flat price with fair use, never cut off.

100 free checks, no card Cancel anytime Secure payment by Stripe