Data Tool
Table of Contents

Data Tool is a browser-only converter for JSON, CSV and TSV. Paste, drop or upload a file, and it detects the format, previews the data in a table, and lets you copy or download the result. There is no upload, no account and no backend: the conversion runs in the browser.
Why it exists
I kept writing the same throwaway scripts to convert data at work. The online tools I tried worked, but the interaction was wrong: paste, select the input format, select the output format, copy, and only then get the result. That is 1 paste and about 5 clicks for something that should take 1 click.
The goal was to remove every step that the tool could infer. The input format can be detected, and there are only three output formats, so the output does not need a dropdown either.
What it does
- Paste, drop or upload JSON, CSV or TSV files.
- Auto-detect the input format, with a manual override.
- Live table preview with pagination, page sizes and row/column counts.
- Copy or download the converted output in one click.
- A formatted, syntax-highlighted view of the result.
- Three sample datasets to try without your own data.
- Three 15-second Remotion walkthroughs in the documentation section.
- Everything runs locally in the browser — no uploads, no account.
Tech stack
| Layer | Technology |
|---|---|
| UI | React 19, TypeScript |
| Components | Ant Design 6 |
| Build | Vite 8 |
| Parsing | PapaParse |
| Highlighting | @speed-highlight/core |
| Concurrency | Web Workers |
| Video docs | Remotion |
| Tests | Vitest, Testing Library |
Architecture
The converter is built around an intermediate representation (IR):
JSON ─┐
CSV ─┼─> IR ─> JSON / CSV / TSV
TSV ─┘
Each input format parses into the same tabular IR; each output format renders from it. Parsing and conversion run in Web Workers so a large paste does not block typing or scrolling. If a worker cannot start or takes too long, the app falls back to parsing on the main thread so the preview still updates instead of failing silently.
Auto-detection is deliberately simple: JSON starts with [ or {, a tab means TSV, otherwise CSV. It is a heuristic, not a parser, and the manual toggle exists because it can be wrong. Input is debounced before parsing, and the last selected formats are kept in localStorage.
What was technically interesting
Profiling turned a rendering problem into a 99% win
The first version lagged badly on large inputs. My instinct was that the conversion itself was slow, so I tried a different IR. That changed nothing.
Profiling a 5,000-line CSV in React DevTools told a different story. A single render took 21.2 seconds, and the flame graph pointed at the syntax-highlighted output box, not the conversion. The most expensive component on the page was one most users did not need to see.
The fix was to remove it from the critical path:
- The formatted output is only mounted when the user opens it. On initial load the page went from 21.2 seconds to 13.1 milliseconds, a reduction of more than 99%.
- When the user does open it, the highlighter is a lazy-loaded React component behind
Suspense, and the view refuses to highlight output larger than 200,000 characters. Highlighting a 5,000-line file still takes about 4.3 seconds, but it no longer blocks the rest of the page.
That was the useful lesson: benchmark before optimising, and when a component is expensive, first ask whether it needs to be rendered at all. Making the parser faster would not have fixed a problem that was never in the parser.
Workers with a working fallback
Parsing and conversion each run in a worker, with a 6-second timeout and a main-thread fallback if the worker errors, is blocked by CSP, or never responds. This is not just a performance choice: it is what lets the UI stay responsive while a large input is being read, and it keeps the tool usable in environments where workers are unavailable.
Fewer clicks, without hiding the controls
Auto-detection removes the input-format selection. Three output buttons remove the output-format selection, and copy/download are on the same row as the preview. The flow is now 1 paste and 1 click. The manual format controls are still there for the cases where the heuristic is wrong.
The auto-detector has known limits: a CSV file containing tab characters can be classified as TSV, and a single-column TSV is indistinguishable from CSV. Those are documented rather than hidden, because the fallback is a two-click override.
Documentation as generated video
The documentation section includes three 15-second Remotion walkthroughs for JSON → CSV, CSV → JSON and TSV → CSV. The compositions are rendered to public/videos/ with npm run video, with posters and text transcripts; the page uses native video controls. Because the videos are generated from code, updating a guide is a re-render rather than a manual screen recording.
Answer-engine and no-JavaScript content
The site also ships static metadata, JSON-LD for WebSite, WebApplication, WebPage, FAQPage and HowTo, a no-JavaScript fallback injected at build time, a robots.txt that welcomes major AI crawlers, an llms.txt, and a video sitemap. The visible FAQ, how-to and format content is generated from the same source as the schema, so the markup and the page cannot disagree.
Caveats
- JSON input is limited to flat, single-layer arrays. Nested objects are not part of the conversion model.
- The formatted view is opt-in because highlighting large outputs is expensive; the preview and copy/download path work without it.
- Very large inputs are still bounded by browser memory, even with workers.
Related blog post
- Building a data converter that saves 4 clicks — the build story, the React Profiler session, the 21.2s → 13.1ms result, and the trade-offs behind the optimisations.