TXT to JSON
Convert plain text into valid JSON: lines to an array, key: value lines to an object, or a delimited table to an array of objects.
Three ways to convert
Lines to array is ideal for lists. Key: value lines produce a configuration-style object. Table mode turns rows into objects keyed by the header row.
Always valid
The output is produced by a JSON serializer, so quotes and special characters are escaped correctly.
TXT to JSON FAQ
Which conversion modes are available?
Lines to array turns each line into an item of a JSON array. Key: value lines become a JSON object. Delimited table uses the first row as headers and returns an array of objects.
Can numbers and true or false be detected?
Yes. With the option on, numeric text becomes numbers and true, false and null become real JSON values. Switch it off to keep everything as strings.
Is the output valid JSON?
Yes. Output is generated with a JSON serializer, so strings are escaped correctly and the result can be pasted into any parser.
Does my text leave my device?
No. Everything is converted in your browser.
What if my keys repeat?
In key-value mode the last value wins, because a JSON object cannot hold two identical keys.