List to Format Converter

Paste your list and instantly export it as JSON, SQL, Python, JavaScript, YAML, HTML, Markdown, regex, hashtags, or 15+ other formats.

Your List
Type or Drag & Drop a file
Paste a list above to see the converted output

Developer

Markup & Content

Data

["apple","banana"]

Examples:

Output Options

Frequently Asked Questions

What formats can I convert my list to?
21 formats across three groups:
  • Developer: JSON array, JavaScript array, TypeScript enum, Python list, PHP array, YAML, XML, SQL IN clause, SQL INSERT, regex, URL-encoded, and escaped strings.
  • Markup & Content: Markdown bullets, Markdown numbered list, HTML unordered and ordered lists, hashtags, and URL slugs.
  • Data: CSV row, TSV row, and quoted lines.
For example, paste London, Paris, Rome (one per line) and pick SQL IN to get WHERE city IN ('London', 'Paris', 'Rome') - ready to drop into your query.
What is the difference between JSON array and JavaScript array?
Both wrap your items in brackets, but the quoting rules differ:
  • JSON - always double quotes, valid for APIs, config files, and JSON.parse().
    coffee, tea, juice → ["coffee","tea","juice"]
  • JS Array - single quotes by default (configurable to double or backtick), pastes straight into a .js or .ts file.
    coffee, tea, juice → ['coffee','tea','juice']
Rule of thumb: use JSON for data exchange, JS Array for source code.
How does the SQL IN clause format work?
It wraps your list in WHERE column IN ('value1', 'value2', ...), ready to paste into any SELECT, UPDATE, or DELETE query.
Set the column name in Options. For example, New York, Los Angeles, Chicago with column city gives:
WHERE city IN ('New York', 'Los Angeles', 'Chicago')
Works identically across MySQL, PostgreSQL, Oracle, MSSQL, SQLite, and Sybase - the IN clause is standard SQL.
For inserting rows instead of filtering, switch to SQL INSERT, which generates one INSERT INTO table (column) VALUES ('value'); per line.
What if my list contains prices or quantities - will numbers be quoted?
By default, every item is treated as a string and wrapped in quotes. Enable Numbers without quotes in Options to change this for JSON, JavaScript, Python, and PHP.
For example, a list of prices:
With quotes (default): ["9.99", "14.99", "29.99"]
Without quotes: [9.99, 14.99, 29.99]
Any item that can't be parsed as a number (like free or TBC) is always quoted regardless.
Can I generate hashtags or URL slugs from my list?
  • Hashtags - prepends # to each item and joins them with spaces.
    Paste travel, photography, sunsets → #travel #photography #sunsets, ready for a caption or bio.
  • Slugs - converts each item to a URL-safe slug.
    Best Coffee Shops in London → best-coffee-shops-in-london, useful for generating page URLs, tags, or file names in bulk.
Choose hyphens or underscores in Options. Both update live as you type.
Can I go the other way - extract a plain list from JSON, SQL, or CSV?
Yes. Switch to Format → List using the toggle in the control panel.
Paste any supported format and the tool auto-detects it, pulling out plain items one per line:
  • JSON array
  • SQL IN clause
  • CSV row
  • Markdown bullets or numbered list
  • HTML list
  • YAML
Handy when you receive structured data from a colleague and need a clean list to paste elsewhere or run through another tool.

Related reading

Share this tool

Featured on ToolDirs
© 2026 ListDiff

Free online list and text processing tools.