Dev TooloraLocal dev tools

> Text

List Converter

Convert a list between lines, comma, semicolon, tab, JSON array and SQL IN formats, with trimming, empty-item removal, deduplication and quoting.

Runs locallyWorks offline
Back to results
Input

Source data

Quote items
Output

Result

Your result will appear here.

Tool guide

About this tool.

  • A list is a sequence of short values written with some separator: one per line, comma separated, a JSON array or a SQL IN clause. Converting between them is a recurring chore when moving ids, emails or names between spreadsheets, logs, queries and code.
  • This tool splits the input into items, optionally trims, drops empty items and removes duplicates, then joins the items in the output format you choose. Everything runs locally in your browser or editor.

  • Turn a column of ids copied from a spreadsheet into a SQL IN (...) list.
  • Turn a comma separated string into a JSON array, or a JSON array into one value per line.
  • Clean up a pasted list: trim whitespace, drop blank rows and remove duplicates.
  • Join items with a custom separator such as " | " or "; " for config values and documentation.

Paste a list or choose a sample, then pick the input and output formats.

Auto-detect works for most pastes. If your values contain commas inside lines, set the input format to Lines so only line breaks split items.

Trim removes surrounding whitespace from every item. Drop empty items removes blank entries such as the one after a trailing newline. Remove duplicates keeps the first occurrence and compares trimmed text exactly, so letter case matters.

Quote items wraps each item in single or double quotes for lines, comma and custom output. SQL output always uses single quotes, and JSON output follows JSON rules.

Copy the result, insert it into the editor, or save list.txt or list.json.

  • Lines to SQL: "a", "b", "b" on separate lines with Remove duplicates on → ('a', 'b').
  • Comma to JSON: red, green, blue → ["red","green","blue"].
  • JSON to quoted lines: ["one","two"] with Double quotes → "one" and "two" on separate lines.
  • Tab to comma: id<TAB>name<TAB>email → id, name, email.
  • Custom separator: one / two / three on separate lines with " | " → one | two | three.

  • Input is limited to 100,000 UTF-16 units and 10,000 items. The limits apply before deduplication.
  • A JSON array may contain strings, numbers, booleans and null only; nested arrays and objects are rejected. Items are converted to their text form, so null becomes the word null. A number a double cannot hold, such as 12345678901234567890, keeps its exact digits.
  • Duplicates are compared after trimming and are case-sensitive. The first occurrence is kept and the original order is preserved.
  • Double quotes are escaped with a backslash and single quotes are doubled; other characters are left unchanged. Browser textareas normalize line endings to LF.
  • The custom separator must be between 1 and 32 UTF-16 units and is used exactly as typed, including spaces.

FAQ

Questions about List Converter

Why does the quote option not change JSON or SQL output?

JSON output always uses JSON string rules, and SQL output always uses single quotes with doubled apostrophes. The Quote items option only applies to lines, comma and custom output.

How do I build a SQL IN list with apostrophes?

Choose SQL IN list. Every item is wrapped in single quotes and any apostrophe inside is doubled, so O'Brien becomes 'O''Brien'. Numeric ids are still quoted; remove the quotes by hand if your column is numeric.

What does auto-detect do?

Auto treats text starting with [ and parsing as a JSON array as JSON. Otherwise it picks the first separator found in this order: newline, comma, semicolon, tab, space. A single newline at the very end does not count. Text with none of them is a single item. Set the input format explicitly when this guess is wrong.

Is there a size limit?

Input is limited to 100,000 UTF-16 units and 10,000 items. Larger input is rejected with a message naming the limit, so the page never freezes on huge pastes.

Continue with

Sort LinesSort physical lines with explicit language rules, natural number groups, stable ties and preserved separator-slot line endings.Deduplicate LinesRemove repeated physical lines with explicit comparison rules while preserving original spelling, spacing and retained line endings.JSON FormatFormat, minify or validate JSON without rounding numbers, rewriting strings or dropping duplicate keys.Join & Split LinesJoin lines into one line with any separator, or split text into lines on a separator or into fixed-length pieces.