Text to JSON Array Converter
Convert text, lists, or comma-separated values into a valid JSON array instantly.
Build the JSON array
Strict JSON array builder
// Your converted output will appear here.
Choose strings, numbers, booleans, or null, then copy or download pretty-printed or minified JSON. Everything runs securely in your browser — nothing is uploaded.
How to use the Text to JSON Array Converter
Paste your values
Paste values or upload a TXT file. Split the input by new line, comma, semicolon, tab, space, or a custom delimiter; the badge confirms Valid JSON as you type.
Choose pretty or minified
Pretty for files a person will read and diff. Minified for request bodies and anywhere bytes matter.
Decide whether types are inferred
Strings quotes everything, which is always safe. Auto emits real JSON numbers, booleans and nulls where the value matches.
Text to JSON Array Converter examples
A pretty-printed JSON array
Input
pending approved archived
Output
[ "pending", "approved", "archived" ]
Minified for a request body
Input
pending approved archived
Output
["pending","approved","archived"]
Real JSON types
Input
1 2.5 true null draft
Output
[ 1, 2.5, true, null, "draft" ]
With Value type on Auto. On Strings every entry would be quoted, including "true" and "null".
Working with text to JSON array
What makes JSON strict
JSON allows double quotes only, forbids trailing commas, has no comments and has no undefined. A JavaScript array literal can break all four rules and still run. That is why output here goes through JSON.stringify rather than being assembled by hand — the specification does the escaping, including the escape sequences for control characters.
Quoted numbers are a real decision
["1", "2"] and [1, 2] are both valid JSON and mean different things to whatever consumes them. Schema validators reject the wrong one, and JavaScript will happily turn "1" + 1 into "11". Choose Auto when the values genuinely are numbers; leave Strings on for IDs, ZIP codes and phone numbers, where a leading zero matters.
JSON arrays versus JavaScript arrays
Every JSON array is a valid JavaScript literal; the reverse is not true. If you are pasting into a .js file, the JavaScript Array Converter lets you pick single quotes or a const declaration. If the output goes into a .json file, an API request, or a config a parser will read, it has to be strict JSON.
Popular text conversion tools
JavaScript Array Converter
Turn a list or string into a JavaScript array with const, let or var, single, double or template quotes, and automatic number and boolean detection.
Array to Text Converter
Paste a JSON or JavaScript array and get plain text back — one value per line, comma separated, or joined with a custom separator, brackets and quotes removed.
CSV to Array Converter
Parse real CSV with quoted commas, escaped quotes and headers into arrays of rows or objects, then output JSON, JavaScript, Python or PHP.
Python List Converter
Convert pasted text into a Python list, tuple or set with correct True, False and None literals, single or double quotes, and numeric type detection.
Text to JSON Array Converter FAQs
Create valid JSON from your text
Paste values or upload a TXT file above to build the JSON you need. Already have an array and need plain values instead? Use the Array to Text Converter.