Multi-line and Tuple convert
Multi-line and Tuple convert tool helps you convert between multi-line text and tuple formats.
All tools on this site run entirely in your browser locally. No data is uploaded to any server.
Features:
- Lines to Tuple: Convert multi-line text to tuple format (e.g. (1,2,3))
- Tuple to Lines: Convert tuple format to multi-line text
- Add Quotes: When converting, you can select whether to add quotes to each item
Example:
- Lines to Tuple: 1↵2↵3 → (1,2,3)
- Lines to SQL IN (with single quotes): user1↵user2 → ('user1','user2')
- Tuple to Lines: (1,2,3) → 1↵2↵3
- SQL IN to Lines: IN (1,2,3) → 1↵2↵3
How to use
- Type or paste one value per line into the editor, or drag and drop a local file (.txt, .csv).
- Click Lines to Tuple/SQL IN to wrap each line into a tuple or IN clause. Tick Add Quotes and pick single quotes for SQL strings.
- Click Tuple/SQL IN to Lines to split a tuple or IN clause back into one value per line.
- Use the result directly inside
WHERE id IN (...)in SQL queries. - Use Copy to copy the result, or the download icon to save it as a .txt file.
FAQ
- Q: Do SQL strings need single quotes inside the IN clause?
A: Yes, SQL requires string values to be wrapped in single quotes; numbers can be left bare. Tick Add Quotes and choose single quotes. - Q: What if a value already contains a quote?
A: The tool wraps each line as-is, so inner quotes will still appear. Escape them first (SQL doubles quotes:'→'') or pick the opposite quote style. - Q: What input does "SQL IN/Tuple to Lines" support?
A:(1,2,3),IN (1,2,3), and full clauses likeWHERE id IN (1,2,3)all work. Elements can be numbers or quoted strings.