Home/ Glossary/ List Converter
Konverter

List Converter

The List Converter transforms plain lists between a wide variety of formats: newline-separated, comma-separated, semicolon-separated, JSON arrays, SQL IN clauses, and more. It saves the repetitive manual work of reformatting a list of values for pasting into a query, API call, or configuration file. Simply paste your list, choose the output format, and copy the result.

Why do developers need list conversion?

Lists of values appear constantly in development workflows: a column of email addresses from a spreadsheet, a newline-delimited export from a database tool, or a comma-separated set of IDs from an API. These lists need to be reformatted frequently for different contexts – SQL WHERE IN clauses require values in parentheses with commas and quotes, JavaScript arrays need square brackets and quotes, shell scripts may need space-separated values, and CSV exports need comma-delimited lines. Doing this manually with find-and-replace is tedious and error-prone. A dedicated list converter handles all these transformations instantly.

How does the tool work?

The tool first splits the input on the detected (or user-selected) input delimiter: newline, comma, semicolon, tab, or space. Each item is trimmed of leading and trailing whitespace. Empty items produced by trailing delimiters are removed. The clean item list is then joined using the chosen output format. For quoted formats (JSON array, SQL IN), each item is wrapped in single or double quotes as required. For SQL IN clauses, the list is wrapped in parentheses. Deduplication and sorting are optional post-processing steps that can be enabled before the final output is generated.

Typical Use Cases

  • Converting a newline-separated export from a spreadsheet into a SQL WHERE IN clause
  • Transforming a comma-separated list of IDs into a JSON array for an API request body
  • Deduplicating and sorting a list of email addresses before importing them into a mailing tool
  • Converting a space-separated list of hostnames into a newline-delimited config file

Step-by-step Guide

  1. Step 1: Paste your list into the input field.
  2. Step 2: Select or confirm the input delimiter (the tool auto-detects common delimiters).
  3. Step 3: Choose the desired output format from the dropdown (e.g. JSON array, SQL IN).
  4. Step 4: Optionally enable deduplication or sorting, then copy the result.

Example

Input
apple
banana
cherry
Output
SQL IN: ('apple','banana','cherry') | JSON: ["apple","banana","cherry"]

Tips & Notes

  • Enable 'Remove duplicates' when working with exported IDs or emails that may contain repeated entries.
  • For SQL IN clauses, choose 'single quotes' to match the SQL string literal convention used by most databases.
  • Use 'Sort' to alphabetically order the items before converting – helpful for producing deterministic outputs in configuration files.

Frequently Asked Questions

Can I handle lists with items that contain the delimiter character?
If your items contain commas and the delimiter is also a comma, the tool cannot reliably split them. Use a different delimiter (semicolon or tab) or ensure items are quoted in the input.
Does the tool support multicolumn CSV data?
No. The List Converter is designed for single-column lists. For multicolumn CSV, use the JSON ↔ CSV converter.
How does deduplication work?
Deduplication compares items as strings (case-sensitive by default) and removes all but the first occurrence of each duplicate. Enable case-insensitive mode to also catch duplicates that differ only in capitalization.
List Converter
Process line-based lists: trim, sort, deduplicate, add prefixes and suffixes, change delimiters, and much more.
Open Tool