TOON to Table ViewerTOON to Table
Nothing to show yet
Paste a TOON document on the left, or load the sample.
Why TOON reads so naturally as a table
Most format viewers have to invent a table. Given nested JSON they guess which array is the interesting one, flatten what is underneath it, and hope the columns make sense. With TOON there is nothing to guess: a tabular block already is a table. The header line subscribers[4]{subscriberId,msisdn,iccid,plan,roaming,rsrp}: names the columns and states the row count, and the indented lines beneath it are the rows.
So this page is less a converter than a renderer. The header becomes the column row, each delimited line becomes a record, and sorting and filtering work the way you would expect. A field that holds a block instead of a plain value — a cell: section holding cellId and tac, say — gets its own column showing Object{...} until you click it open. Nothing is hidden from you; it just starts out collapsed.
That closeness to a grid is the practical argument for the format. A tabular block is roughly what you would get from RFC 4180 CSV, except that it can also express the nested sections CSV has no way to represent, and it carries its own row count so a truncated file is detected rather than quietly accepted.
The format is defined by a public specification and reference implementation, which is worth a look if you are deciding whether to adopt it. It is still at 0.x.
Reading a document here
- Paste your TOON – Left pane, or press Sample to see a populated table immediately. The grid rebuilds as you type, so a malformed row can be fixed in place.
- Sort and filter – Click a column header to sort. The filter box narrows rows across every column at once, which is the quickest way to find one subscriber in a few thousand.
- Expand a nested cell, or flip the whole grid – A field that holds a block instead of a plain value shows as <code>Object{...}</code> until you click it open, or press Expand all to open every one at once. Main and Nested flip rows and columns, which is worth trying when a document has a handful of records and a lot of fields — scrolling down usually reads better than scrolling sideways.
- Maximize for a wide document – Maximize gives the grid the full window, which is usually the difference between scrolling sideways and not.
- Save a link if you want to come back – Save stores the document and hands you a URL that reopens it. Anything you do not save stays in this tab and nowhere else.
If the page tells you there is nothing to tabulate, look at what is at the top of the document. A bare list of numbers or strings — or a single value with no fields at all — has nothing to become column names, so there is no table to build from it. TOON only produces a tabular block when every object in an array carries the same fields, the same uniformity that JSON to Table needs, for the same reason.
A header line and what it becomes
Four subscriber records. Read the header once and you already know the shape of the grid on the right.
subscribers[3]{msisdn,imsi,plan,roaming,rsrp}: "447700900142","234150999912345",Unlimited 5G,true,-92 "447700900458","234150999967810",Pay As You Go,false,-104 "447700900773","234150999934562",Business 200GB,true,-78
| msisdn | imsi | plan | roaming | rsrp |
|---|---|---|---|---|
| 447700900142 | 234150999912345 | Unlimited 5G | true | -92 |
| 447700900458 | 234150999967810 | Pay As You Go | false | -104 |
| 447700900773 | 234150999934562 | Business 200GB | true | -78 |
When you would reach for this
Checking an export before it goes anywhere
A dense block of comma-separated rows hides an empty field or a shifted column extremely well. Put it in a grid and a blank cell is obvious at a glance. This is the fastest sanity check there is on a file someone just handed you.
Finding the outlier
Sort by rsrp and the worst cell in the export is the first row. Sort by iccid and duplicates sit next to each other. Neither question is answerable by reading the raw text.
Explaining a file to someone else
Handing a colleague a screenshot of a grid works. Handing them a wall of delimited rows and a header they have to parse in their head does not.
Deciding whether TOON suits your data at all
If your document renders as one clean table, TOON is a good fit and converting from JSON will pay off. If it renders as a handful of loose rows with mostly empty columns, your data is not uniform enough to benefit and you are better off leaving it as JSON.
Questions people actually ask
Why does my long ID look right here but wrong everywhere else?
Because most readers hand the value to JavaScript, which cannot hold an integer past Number.MAX_SAFE_INTEGER — every number is a double, as ECMA-262 defines the Number type. An ICCID of 8901240544102066246 comes back as 8901240544102066000, and the SIM one digit along collapses onto the same value. This page reads those digits before that can happen, so what you see in the cell is what is in the file.
Can I put comments in my TOON?
No, and this catches people coming from YAML almost immediately. There is no comment syntax — a line starting with # fails with Missing colon after key, because the reader is trying to interpret it as a key. If you need to annotate a document, the annotation has to become a field.
My file uses tabs between values. Is that allowed?
Yes. Comma, tab and pipe are all legal, and the header records which one the document uses. That is also why this editor inserts spaces when you press Tab — a stray tab in a row would change where the fields split rather than just indenting oddly.
It says a row count is wrong, but the table filled in anyway.
That is the repair working, not a rejection. The number in subscribers[4] counts data rows only, and it goes out of step with what is actually below it the moment someone adds or deletes a line by hand. Rather than refuse the file, this page corrects the count in a copy of your text and reads it again, so every row still reaches the table. The grey note under the grid says so, because the alternative — fixing it without a word — would leave you thinking your .toon file and the table in front of you agree about the row count when they do not. Update the header in your source and the note goes away.
Can I get this as JSON or CSV instead?
Yes — TOON to JSON expands it into objects, and from there JSON to CSV takes it to a spreadsheet. If you are moving data between systems rather than reading it, JSON Lines is worth considering too, since almost everything already reads it.
Does anything get uploaded?
Only if you press Save, which exists to create a shareable link and is the one action that stores anything. Pasting, sorting and filtering all happen in this tab.