Example
This input:
blue
42
3.5
say "hi"
C:\temp gives this output with the settings on this page:
["blue", 42, 3.5, "say \"hi\"", "C:\\temp"] A JSON array in one step
Paste the rows and copy the result. Text becomes "text", numbers stay as numbers, and the list is wrapped in [ ]. You can paste it into a request body, a config file or a test fixture.
The tool escapes characters the way JSON requires. A double quote becomes \", a backslash becomes \\, and a tab or line break inside a value becomes \t or \n.
What counts as a number
A JSON number has no plus sign and no leading zeros. The values 42, -7 and 3.5 stay bare. A value such as 007 or +5 is not valid JSON as a number, so it is quoted as text.
Using the array in code
- JavaScript: paste it into const items = ...;.
- Python: a JSON array of strings and numbers is also a valid Python list.
- cURL and API tools: paste it into the JSON body.
- For a Python list with single quotes, use the single quote page instead.