Text to JSON
Turn plain text into a valid JSON object with a lines array — free, instant, nothing uploaded.
Convert in 3 simple steps
Add your text
Paste text or upload a .txt file.
Convert to JSON
Get a valid object with a lines array.
Copy or download
Grab the JSON or save it as a .json file.
Why use this text to JSON converter
Always valid
Output is produced by the standard JSON encoder.
Properly escaped
Quotes, tabs and newlines are handled correctly.
Lines array
One array item per line, plus the full text.
File or paste
Upload a .txt or paste directly.
Private
Runs locally; nothing is uploaded.
Free
No sign-up and no limits.
Plain text into valid JSON
Need your text as data? This tool wraps it in a valid JSON object — a lines array plus the full text — with everything correctly escaped, so you can drop it straight into code, a config file or an API request.
If your data is tabular, the CSV to JSON tool produces objects with named keys instead. You can also convert text to XML or HTML, or tidy the result with the JSON formatter.