Text to JSON converter
Turn plain text into valid JSON: key: value lines become an object, plain lines become an array, or the whole text becomes a single JSON string.
How it works
-
Paste your text
Type or paste the text in the left box, or open a .txt file. No text to hand? Click Example.
-
Instant result
The result appears as you type. Change the options and see straight away what changes.
-
Copy or download
Copy the result with one click, save it as a file or use it as input for a next step.
Three modes
- Object (key: value):
name: One caféandseats: 24become{"name": "One café", "seats": 24}. - List (each line): every line becomes an item in a JSON array.
- One JSON string: the entire text, with quotes and line breaks escaped, ready to paste into JSON or source code.
With Recognise numbers, true, false and null on (the default), 24 becomes a number and true a boolean instead of a string.
To make JSON readable, use the JSON formatter. To convert JSON back to plain text, use JSON to text.
Frequently asked questions
Is the text to JSON free?
Yes. The text to JSON is completely free, with no account, sign-up or usage limit.
Is my text stored?
No. Your text is processed in your browser and is not sent to a server or stored.
Is there a maximum length?
No, there is no fixed limit. Very long texts can just be a little slower.