TXT to JSON converter
This free TXT to JSON converter turns plain text into valid JSON. It spots whether your text is a list, key: value pairs or a table with a header row, and builds the right structure.
- Detects lists, pairs and tables
- Numbers and true/false typed correctly
- Pretty or minified output
Loading the TXT to JSON converter…
How to convert TXT to JSON
- 1
Add your text
Paste it or drop .txt, .csv, .tsv or .log files.
- 2
Check how it is read
Leave "Detect automatically" on, or force lines, key: value pairs or a table with a header.
- 3
Convert and use it
Copy the JSON or download a .json file. It is validated by the browser before you see it.
Why use this free JSON converter
Built for speed and privacy. It works on any modern browser, on desktop or phone.
Files never leave your device
It runs inside your browser. Nothing is uploaded to LeadCanal or stored anywhere.
Only the right files open
It accepts .txt, .csv, .tsv, .log and .jsonl and checks each file's first bytes, so renamed programs or scripts are refused.
Free with no limits we impose
No signup, no watermark and no daily cap. Big files depend only on your device memory.
Several files at once
Where it makes sense, drop many files and download them together as a ZIP.
TXT to JSON examples: how each kind of text converts
| Text in | JSON out |
|---|---|
| apple / banana / cherry (one per line) | ["apple", "banana", "cherry"] |
| name: Ana / age: 31 / active: true | {"name": "Ana", "age": 31, "active": true} |
| Blocks of key: value pairs with blank lines between | An array with one object per block |
| name,email (header) then rows | [{"name": "Ana", "email": "ana@x.com"}, ...] |
| One JSON object per line (NDJSON) | A single JSON array |
Clean data types, not just strings
Numbers become JSON numbers and true, false and null become their JSON types, so the output works in code without extra parsing.
Values that only look like numbers, such as ZIP codes with a leading zero (02134) or IDs longer than 15 digits, stay as text so nothing is lost.
- Duplicate keys become arrays
- Empty header cells get column_1 style names
- Indent with 2 spaces, 4 spaces, tabs or minify
Step-by-step guides
Step-by-step help from our blog, written for the questions people ask most.
Your files stay on your device
This converter runs inside your browser, using your own computer or phone to do the work. The file is never uploaded to LeadCanal or anyone else, and nothing is saved on our servers. Close the tab and it is gone.
Each tool only opens the file types it is built for. We check the file extension and the first bytes of the file, so a renamed program or script is refused before it is opened.
Drop the .txt file into the converter and click Convert to JSON. The layout is detected for you, and you can download the result as a .json file.
Yes. Lines like "name: Ana" or "name=Ana" become object keys and values. Separate records with a blank line to get an array of objects.
Yes. Tab, comma, semicolon and pipe separated text with a header row becomes an array of objects.
No. The conversion runs in your browser and the text never leaves your device.
Further reading
- RFC 8259: the JSON standard The official JSON data format specification.
- Python json module How to read the JSON output in Python.
Need clean, verified B2B contact data?
Our free tools handle files. Our team builds verified lead lists and runs cold email that books meetings.