List to JSON Converter

Turn a line-by-line list into a JSON array.

Converting a simple text list into a JSON array is a common task when preparing data for APIs, configuration files, and JavaScript applications. This tool wraps each line as a properly formatted JSON element, handling strings, numbers, and special characters with valid JSON syntax.

[]

How to Convert a List to JSON

  1. Paste your list — enter items one per line.
  2. Click Convert — the tool wraps each line as a JSON array element.
  3. Copy the JSON — use the output in your code, API request, or configuration file.

Frequently Asked Questions

What format of list does this tool accept? ▼
The tool accepts plain-text lists with one item per line. Items can be strings, numbers, or mixed content. Blank lines are typically ignored. The output is a valid JSON array: ["item1", "item2", "item3"].
Can I create nested JSON from a list? ▼
For simple flat lists, the output is a JSON array. For key-value pairs, use a delimiter like "key: value" or "key=value" and the tool can generate a JSON object. Complex nested structures may require manual editing or our JSON Formatter tool.
How are numbers handled? ▼
Items that are valid numbers (integers or decimals) can be converted as JSON numbers (without quotes) or kept as strings (with quotes), depending on the tool settings. This matters because JSON distinguishes between "42" (string) and 42 (number).
Why would I need to convert a list to JSON? ▼
Common use cases include: preparing test data for API requests, converting spreadsheet columns to JSON for web applications, generating configuration arrays, creating seed data for databases, and formatting data for JavaScript applications.
Can I convert CSV or TSV to JSON? ▼
For multi-column data (CSV/TSV), use our dedicated CSV to JSON tool, which handles headers, delimiters, and creates properly structured JSON objects. This tool is designed for simple single-column lists.
Is my data stored? ▼
No. All conversion happens in your browser. No data is sent to any server.