JSON Loomly

Weave JSON into the shape you need.

Format, sort, flatten, convert to CSV and back, infer a schema, generate TypeScript types or compare two documents. Everything runs in this tab; nothing is uploaded.

Input
Output

The result lands here. Pick an action in the toolbar, or press ⌘K and type what you want to do.

0 B0 linesLn 1, Col 1empty

Everything runs in this browser tab. Your JSON is never uploaded; you can go offline after the page loads.

What the workbench does

Fourteen actions on one document

Format, minify, sort keys, flatten and unflatten, JSON to CSV and back, JSON Schema, TypeScript interfaces, a tree view, a structural diff, escaping and document stats. Any result can be moved back into the input, so transforms chain: CSV → JSON → unflatten → sort keys.

Errors that say where and why

A trailing comma, a single quote, an unquoted key or a bracket that never closes is reported with a line, a column and a sentence in plain language, and underlined in the editor as you type. Switch on JSONC when the file is a settings file with comments — the output stays strict JSON.

Big documents keep the tab responsive

Parsing and every transform run in a Web Worker, off the main thread, so converting a multi-megabyte export does not freeze the page — the status bar keeps updating while it works. Files up to 32 MB open from the picker or by dropping them anywhere on the workbench.

About JSON Loomly

JSON Loomly is a JSON workbench that loads once and then works entirely inside your browser tab. Paste a document, drop a file or press Sample, and the editor checks it as you type: line numbers, folding, bracket matching and search on one side, and on the other an error that names the line, the column and the reason — a trailing comma, a single quote, a key without quotes. From there the toolbar reshapes the document: pretty-print it with two spaces, four spaces or tabs, minify it back to a single line, sort every object's keys alphabetically and recursively, flatten the tree into dot or bracket paths, or fold those paths back into nested objects and arrays.

The converters cover the jobs that usually need a script. JSON to CSV turns an array of objects into rows and nested values into path-named columns, with a comma, semicolon or tab delimiter; CSV to JSON reads the header line into keys and can infer numbers, booleans and nulls. Infer JSON Schema writes a draft 2020-12 document with types, required lists, string formats such as date-time and email, and enums for small value sets; JSON to TypeScript writes the matching interfaces with optional properties marked. Compare parses two documents and lists every path that was added, removed or changed — key order and indentation are ignored, because they are not differences in the data. None of this is sent anywhere: there is no server behind this page to send it to.

Questions people ask

Answers about privacy, limits, and the choices the transforms make on your behalf.

Is my JSON uploaded anywhere?

No. JSON Loomly is a static page: parsing, formatting, conversion and comparison all run in your browser, in a Web Worker on your own device. There is no backend, no account and no analytics script. After the page has loaded you can disconnect from the internet and every action keeps working.

How large a file can it handle?

Files up to 32 MB can be opened; the transforms themselves run off the main thread, so the page stays responsive while a big document is processed. The practical limit is the editor: beyond roughly 10–15 MB, scrolling and syntax highlighting get noticeably slower in any browser-based editor. For larger exports, split the file or use a command-line tool such as jq.

Why does my JSON with comments fail to parse?

Standard JSON (RFC 8259) has no comments and no trailing commas. Files like VS Code's settings.json or tsconfig.json use a relaxed dialect called JSONC. Turn on the JSONC toggle above the input pane and the editor accepts // and /* */ comments and trailing commas; the output is always strict JSON, so you can use it to clean such a file for a tool that insists on the standard.

Is sorting keys safe? Does it change the data?

For almost every consumer, yes: the JSON specification says object keys are unordered, and parsers in every major language treat {"a":1,"b":2} and {"b":2,"a":1} as the same object. Arrays are never reordered by Sort keys — only object keys are, recursively. The one case to be careful with is software that reads JSON as text and depends on key positions, for example a hand-written diff or a signature computed over the raw bytes.

What happens to nested arrays when I convert to CSV?

Each element becomes its own column named by its path: tags[0], tags[1], items[0].sku and so on, using the path style you picked (dot or bracket). Rows that have fewer elements leave the extra cells empty; empty arrays are written as a literal [] so they survive a round trip. If an array is long, it is usually better to move it to its own sheet — the guide on flattening explains the trade-off.

How accurate is the inferred JSON Schema?

It is a faithful description of the document you gave it, not of every document your system might produce. Types are merged across all items of an array, a property is marked required only if every object has it, string formats (date-time, date, email, uuid, uri, ipv4) are assigned only when every sample matches, and enum is used when a string field has few distinct values across several samples. Treat it as a strong first draft: loosen constraints that your sample happened to satisfy by chance.

Does Compare ignore key order and formatting?

Yes. Both documents are parsed first, and then the trees are walked side by side, so whitespace, indentation and the order of keys inside objects never show up as differences. What is reported is structural: paths that exist only in A (removed), only in B (added), or in both with different values (changed). Array elements are compared by position, so inserting an item at the start of a list will show every later element as changed.

Which keyboard shortcuts are there?

Cmd+K (Ctrl+K on Windows and Linux) opens the command palette, where you can type any action and run it with Enter. Cmd+Enter formats the input, or runs the comparison when Compare mode is on. Inside the editor the usual CodeMirror keys work: Cmd+F to search and replace, Cmd+Z to undo, Tab to indent, and the fold arrows in the gutter collapse objects and arrays.