Text to SQL List Converter

Paste one value per line, choose the quote style, and press Convert to SQL list. Quotes inside values are escaped, so the list is ready for WHERE column IN (…).

Try an example
Quote style

About this SQL list converter

When you need to look up a set of IDs, emails, or names in a database, the values usually come as a column from a spreadsheet or a report. This converter turns that column into the list SQL expects: each value quoted, separated by commas, and optionally wrapped as IN ( … ) so you can paste it straight after WHERE column. A quote inside a value, as in O'Brien, is doubled so the query does not break. Remove duplicates, trim stray spaces, sort, or change case in the same step, and use no quotes for numeric IDs.

How to build a SQL IN list

  1. Paste your values. Paste one value per line, for example a column copied from Excel or Google Sheets, or press an example.
  2. Choose quotes and options. Single quotes for text, no quotes for numbers; remove duplicates, trim, sort, or change case as needed, and tick Wrap in IN ( … ) for a ready-made clause.
  3. Press Convert to SQL list. Copy the list and paste it into your query, for example WHERE email IN (…).

Frequently asked questions

How are quotes inside values handled?

They are doubled, which is the standard SQL way to escape them: O'Brien becomes 'O''Brien'. The same applies to double quotes and backticks in their styles.

Should numbers be quoted?

Not for numeric columns. Choose No quotes so the database compares numbers with numbers; quoting them can stop an index from being used in some databases.

Is there a limit to how many values I can use?

The converter has no limit, but databases do: Oracle allows 1,000 values in one IN list, and very long lists are slow everywhere. For thousands of values, load them into a temporary table and join instead.

When should I use backticks or double quotes?

Backticks and double quotes mark identifiers, such as column or table names, in MySQL and in standard SQL/PostgreSQL. Use them when the list is for SELECT columns rather than values.

Does it protect against SQL injection?

Escaping quotes makes pasted values safe to run by hand, but applications should always use prepared statements with bound parameters instead of building SQL from text.