JSON WORKBENCH

Twelve free tools for formatting, repairing, converting, querying, and comparing JSON. No account and no upload.

Zero retention: your JSON never leaves this browser. Verify it yourself in DevTools

Loading the workbench.

About 2json

How Can You Verify That Your JSON Never Leaves This Browser?

You do not have to take our word for it. Developer tools show every request a page makes, so you can watch 2json work and confirm that nothing is sent. Auditable trust is worth more than a badge, and the check takes under a minute.

  1. Open your browser developer tools with F12, or Cmd+Option+I on a Mac, and select the Network tab.
  2. Reload the page and let it finish. You will see the page's own files, its web fonts, and one anonymous page-view request. Nothing has been typed yet, so none of them can contain your data.
  3. Click the clear icon in the Network tab so that the log is empty.
  4. Paste your JSON and use any tool you like: format it, convert it, scan it, generate types.
  5. Look at the Network tab again. It is still empty. For extra proof, turn on offline mode after the page loads and the tools keep working.

Only three things can add a line to that log, and none of them carries your document. Submitting the feedback form sends the vote and comment you typed. Clicking an open link in the tree viewer visits that address, as any link does. Pasting text in a script the page has not displayed yet, such as Cyrillic or Greek, can make the browser fetch the matching font file, and that request names only the font.

The production site also sends a Content-Security-Policy header that tells your browser to refuse connections to anywhere except this site and the anonymous analytics endpoint. A coding mistake could not quietly send your data elsewhere, because the browser itself would block the request.

What Is 2json?

2json is a free JSON workbench that runs entirely in your web browser. It combines twelve groups of tools for working with JSON into one page, so you can validate a payload, repair it, convert it to CSV, and generate TypeScript types without pasting the same document into four different websites.

2json was built for developers, and it is written for everyone else who ends up holding a JSON file. Error messages explain what went wrong in plain English, and query examples teach the syntax as you click them.

Why Does Zero Retention Matter for JSON?

JSON payloads routinely contain customer records, access tokens, and internal API responses. Many online formatters send what you paste to a server, and some offer save features that create public links. Zero retention means a tool has nothing to leak because it never receives your data.

2json has no accounts, no database of documents, and no share links, because a share link would require storing your data somewhere. Your document exists only in the memory of this browser tab, and it is gone when you close the tab.

What Tools Are Included?

  • Format: pretty-print with spaces or tabs, minify, and sort keys. Numbers and key order stay exactly as written.
  • Validate: find the exact line and column of a syntax error, read a plain-English explanation, and repair the document in one click.
  • Convert: move between JSON, CSV, YAML, XML, TOML, and query strings, or export to Excel workbooks, SQL inserts, and typed TypeScript tables.
  • Query: test JSONPath, JMESPath, and JSONata expressions against live data, with worked examples for each language.
  • Diff: compare two documents structurally, create and apply JSON Patch documents, and test JSON Pointer expressions.
  • Types: generate TypeScript interfaces, Python TypedDicts and dataclasses, Go structs, Java classes, and JSON Schema from a sample.
  • Escape: escape and unescape strings, unwrap JSON stored inside strings, encode and decode base64, and convert JSON5 to strict JSON.
  • View: explore a collapsible tree that recognizes dates, colors, links, and IDs, with table view, search, and document statistics.
  • Security: scan for emails, phone numbers, API keys, and tokens, produce a redacted copy, and decode JSON Web Tokens.
  • Transform: flatten and unflatten, pick or omit keys across arrays, rename keys, and apply JSON Merge Patch.
  • Schema: validate documents against JSON Schema with errors such as $.items[3].price must be a number, generate valid mock data, and infer a schema from a sample.
  • Data: inspect, sample, split, query, and flatten NDJSON and JSONL files, streaming them from disk.

How Does JSON Repair Work?

JSON repair is the process of rewriting almost-valid JSON into strict JSON. The 2json repair tool reads a broken document with a tolerant parser that understands the mistakes people and programs commonly make, then writes out a clean version.

Repair handles trailing commas, comments, single quotes, unquoted keys, missing commas and colons, unclosed brackets, Python literals like True and None, Markdown code fences, and JSONP wrappers. Every fix is listed with its line and column, because a repair is a best guess and you should be able to review it.

What Is NDJSON, and How Do You Work With Large Files?

NDJSON, also called JSONL, is a format that stores one JSON value per line. It is the standard shape for application logs, data exports, and LLM training files, because a program can read one record at a time.

The Data tab reports bad lines by number, shows which fields appear and how often, draws random samples, and splits files into a downloadable zip. Opening a large file streams it from your disk one line at a time, so a file bigger than your computer's memory can still be inspected.

What Are JSON Patch and JSON Pointer?

JSON Patch, defined in RFC 6902, is a format for describing changes to a JSON document as a list of operations such as add, remove, and replace. 2json generates a patch from two documents and applies patches atomically, so a failing operation leaves your document untouched.

JSON Pointer, defined in RFC 6901, is a syntax for identifying one value in a document, such as /users/0/name. The Diff tab resolves a pointer live and lists every valid pointer in your document. JSON Merge Patch, defined in RFC 7386, is in the Transform tab.

Which Query Language Should You Use?

JSONPath is the best starting point for pulling values out of a document, and it is the most widely recognized. JMESPath is a good fit if you already use the AWS command line, and it excels at reshaping results. JSONata goes further, with aggregation, string functions, and full transformations.

All three run in the Query tab against your current document, and results update as you type. Click any example to load it, then adjust it to fit your data.

Who Is 2json For?

  • Backend and frontend developers debugging API responses that contain real customer data.
  • Data engineers checking NDJSON exports and log files before loading them.
  • Security teams who need to scrub a payload before attaching it to a ticket.
  • Analysts who need a JSON export as an Excel workbook or a CSV file.
  • Anyone who works under a policy that forbids pasting data into third-party services.

How Do You Use 2json?

  1. Paste your JSON into the editor, or drop a file onto it.
  2. Choose a tab. Your document stays loaded as you move between tools.
  3. Read the result, which updates as you type.
  4. Copy or download the output, or apply it back to the editor to keep working.

Part of the 2suite.io privacy-first ecosystem, alongside tools like 2redact for documents and 2convert for files.

Frequently Asked Questions

Is 2json free?

Yes. Every tool is free, with no account, no usage limits, and no paid tier.

Is my JSON uploaded to a server?

No. Every tool runs in your browser, so your JSON never leaves this browser. Nothing you paste is uploaded, stored, or written to local storage.

Does 2json collect any analytics?

Yes, one anonymous page-view count when the page loads, before you can paste anything. If you submit the feedback form, your vote and comment are sent too. No tool ever sends data, and your JSON is never included.

How large a file can 2json handle?

Single JSON documents can be opened up to 256 MB, depending on your device. Larger NDJSON files can still be inspected, sampled, and queried, because the Data tab streams them from disk one line at a time.

Can 2json fix broken JSON?

Yes. The Validate tab repairs trailing commas, comments, single quotes, unquoted keys, missing commas, unclosed brackets, and Python literals, and it lists every change it made so you can check the result.

Will formatting change my numbers?

No. Format keeps numbers and key order exactly as written, including integers too large for JavaScript. Tools that parse values, such as Convert and Query, use JavaScript numbers, and the editor warns you when that would round a value.

Does 2json verify JWT signatures?

No. It decodes the header and payload and explains the claims, but verifying a signature requires the key. Never trust a token because it decoded successfully.

Was this helpful?