data tool
CSV and JSON converter
Two panes, both live. Type in either one and the other rewrites itself, so there is no convert button and no direction to pick first. When something does not parse, the line it is on is marked in the gutter instead of a message telling you the whole document is wrong.
Runs on your device. Nothing is uploaded.
Loading the tool…
How to use it
- 1
Type in either pane
The other side rewrites itself as you type. Whichever pane you touched last is the source, and the download button follows it.
- 2
Watch the gutter
Each pane numbers its lines. A line carrying a fault is marked in that gutter, so a problem has a place in the document rather than only a description.
- 3
Open a flagged line
The strip under the panes lists every fault with its line number. Choosing one jumps to that line and selects it, ready to fix.
- 4
Take the result
Download saves whichever side is the result of what you last edited. Copy puts the same text on the clipboard.
Both sides are the document
Most converters make you choose a direction, paste into a box and press a button, then hand you a read only result. That is fine once. It is wrong the moment you want to fix something, because the fix belongs in the output and the tool will only let you edit the input. Here both panes are editable and both stay live, so a stray comma can be corrected wherever you happen to notice it.
A fault needs a place, not just a message
Unexpected token is not a useful sentence on its own. What you need is the line. Modern JavaScript engines stopped putting a character position in their JSON errors, so this tool scans the text itself and returns the exact character where the document stops making sense. That becomes a line number in the gutter, a marker beside it, and an entry in the problem strip you can tap to jump there.
What survives a round trip
CSV to JSON and back should return what you started with, and for ordinary data it does. Quotes are only added where the format requires them, a quote inside a field is doubled, and a key that appears on only some records still gets a column. Type inference is deliberately timid: a value becomes a number only when it is a plain number that reads back identically, so a leading zero, a phone number or a product code stays text.
Limits
- Nested JSON is flattened to dotted keys on the way to CSV and rebuilt from them on the way back.
- A JSON pane that does not parse leaves the CSV side untouched until it does.
- Long lines scroll sideways inside their pane rather than wrapping, so the gutter stays aligned with the text.
- Everything is held in memory, so a very large file will make typing sluggish.
What it does not do
- It does not validate against a schema.
- It does not rename, reorder or drop columns.
- It does not open a file from disk. Paste the text in.
Questions people ask
Which way does it convert?
Both, at the same time. Whichever pane you typed in last is the source, and the other is rewritten as you type. The download button follows that, so it offers JSON while you are editing CSV, and CSV while you are editing JSON. There is no direction to set and no button to press.
Why has the JSON side stopped updating the CSV?
Because what is in it does not parse yet. The pane is outlined, the line with the fault is marked in its gutter, and the strip underneath names the line and column. The CSV side is deliberately left alone until the JSON parses again, so a half typed edit cannot wipe work you already have.
What happens to nested objects?
CSV has no nesting, so a nested key is flattened to a dotted path. An address object becomes address.street and address.city, and an array becomes tags.0 and tags.1. Going the other way a dotted key rebuilds the object, and a numeric segment rebuilds an array, so a round trip returns the shape you started with.
Do numbers stay numbers?
Only plain ones. A value becomes a JSON number when it is a number that reads back identically, so 12 becomes 12. Anything with a leading zero, a currency symbol or a long identifier stays a string, because quietly turning a phone number or a product code into a number destroys it.
Will a round trip give me back my original file?
For ordinary data, yes. The writer quotes a field only when it holds a comma, a quote or a line break, and doubles any quote inside it, which is exactly what RFC 4180 asks for. Column order follows the header row, and a key that only some records carry still gets its own column.
Is anything uploaded?
No. Both panes run in the page and there is no network request after it loads. Nothing is stored either, so reloading returns both sides to the sample. If you need the result, download it or copy it before you leave the page.
Can it read one object per line?
Yes. When the whole text does not parse as a single document, each non empty line is tried on its own, which is the NDJSON that log tools and data pipelines emit. Advanced options will write that shape back out too, one object per line with no wrapping array and no commas.
Turn this data into a document
Take what you made here into documents.
Create a document with OneCraftRelated tools
- CSV to tablePaste CSV and read it as a sortable grid. Every column header shows its type, blanks and range, and any row with the wrong field count is named by line.
- JSON formatterFormat and inspect JSON in your browser. A collapsible tree beside the text, errors pinned to the line and column, and warnings for duplicate keys.
- Text diffCompare two versions line by line and word by word, with side by side or one column view. Runs in your browser, so a draft contract never leaves your machine.
- Slug generatorType a headline and watch the permalink build underneath, with accents folded, Greek and Cyrillic romanised and symbols spelled out. Batch mode included.
Sources
Written and checked by the OneCraft team. Last checked .