json-tools .ru
Format
Source text Paste JSON / YAML / dict / object / XML
Result Type is not detected yet
Statistics appear after formatting

About

One workspace for JSON and the data around it.

json-tools.ru is built for cases where the data already exists but does not look as clean as it does in docs: a log fragment, an API response, a browser console object, Python repr, Odoo/debug output, YAML or XML. Paste the fragment, and the service detects the format, normalizes the structure and shows the result without manual cleanup.

Works beyond strict JSON

The service understands JSON-like objects: single quotes, unquoted keys, trailing commas, comments, undefined, Python True/False/None and similar fragments.

Converts between practical formats

The same fragment can be output as JSON, YAML, CSV, Python or XML. For CSV, an object or an array of objects becomes a table, and nested fields are flattened with dot-separated names.

Helps inspect the structure

After formatting, you can see the input type, result size, number of keys, objects, arrays, lines and maximum depth. The result can be viewed as code or as a tree.

Changelog

v1.4

Added the public API v1: formatting, type detection, JSONPath search, format list, limits and an OpenAPI schema for integrations.

v1.3

Improved the workspace: result tree with level guides, search navigation, file import and a richer starter example.

v1.2

Expanded tolerant parsing: JSON-like objects, single quotes, unquoted keys, trailing commas, comments, Python literals, tuple/set and some Odoo repr values.

v1.1

Added output and analysis formats: YAML, XML, CSV, structure statistics, key sorting, ASCII mode and strict JSON validation.

v1.0

First service version: JSON formatting and minification in the browser, result copying, basic error handling and a compact interface.

Contact

Service and API feedback

Write if you found a parsing bug, want to suggest a format, need to clarify API behavior or just want to leave interface feedback.

Service email

Email is the main contact channel. It makes it easier to attach sample input, expected output and links to documentation or API requests.

json-tools@yandex.ru

What to include

Input format: JSON, JS-like, Python, YAML, XML or CSV. Selected settings: output, indentation, A-Z, ASCII, strict validation. What you expected and what actually happened.

Quick email

The form does not send data to the server. It only prepares an email body and opens the mail client on your device.

Documentation

How to use the site and API

Reference for input formats, output settings, search, result tree, file import and the public API. Short, but with the details that matter in real work.

Input data

Auto-detection

By default, the service chooses the parser automatically. The order is: strict JSON validation, if enabled; XML-looking input; regular JSON; JS-like object; Python repr/dict/list; YAML; then plain text.

JSON-like object

Common fragments from JavaScript consoles and logs are supported: unquoted keys, single quotes, trailing commas, // and /* */ comments, true/false/null and undefined.

Python and Odoo/debug output

Python dict/list/tuple/set values are converted to JSON-compatible structures. True, False and None become boolean/null. Some values like <Command.SET: 6> are preserved as strings, while datetime.datetime, datetime.date and datetime.time with numeric arguments are converted to readable values.

YAML, XML and plain text

YAML is accepted when it is recognized as an object or array. XML is parsed separately and converted to a JSON-like structure. If no structural format matches, the input is treated as a plain string.

Settings and result

Output and indentation

Output selects the result format: JSON, YAML, CSV, Python or XML. Indent controls final code: compact, 2 spaces, 4 spaces or Tab. The Minify button sends the same input with indentation 0.

A-Z, ASCII and strict validation

A-Z sorts object keys. ASCII escapes non-ASCII characters where the format supports it. Strict validation disables tolerant parsing and requires valid JSON with double quotes and no extra syntax.

CSV

CSV works for an object or an array of objects. Nested objects are expanded into dot-separated columns, for example user.email. Arrays inside cells stay as JSON strings so the structure is not lost.

Code, tree and statistics

The result can be viewed as code or as a tree. The tree is useful for nested API responses: it shows levels, arrays, objects and lets you expand only the branches you need. Statistics count size, keys, objects, arrays, depth and lines.

Search

Result search works like editor search: it shows match count and jumps to the current match. You can search plain text, enable regex or use JSONPath. Queries like $.users[*].email, $..email, array indexes and bracketed keys are supported.

Editor and files

You can import a file into the source editor, copy and download source text or result. Editor settings are stored locally: tab size, visible spaces and tabs, line numbers, line wrapping, active line, matching brackets, theme and pane width.

Interface language

The RU/EN switch in the top bar changes the language of the interface, information pages, SEO metadata and dynamic editor messages. The English version opens with the ?lang=en parameter; Russian is used by default.

Is data stored on the server?

No. The service sends text for processing and returns a result, but does not store user data. To protect against heavy requests, the input text limit is 1000000 bytes.

API v1

API v1 mirrors the main site logic and is intended for integrations: scripts, internal admin tools, CI checks, debug panels and services where data needs to be made readable without opening a browser.

POST /api/v1/format Parses input text and returns the result in the selected format.
POST /api/v1/detect Detects the data type and can optionally return normalized data and statistics.
POST /api/v1/search Runs JSONPath search over the recognized structure.
GET /api/v1/formats Returns supported input modes, output formats and JSONPath examples.
GET /api/v1/limits Shows current API limits.
Formatting parameters

input.mode selects the parser: auto, json, js_like, python, yaml, xml or text. input.strict_json requires strict JSON. output.format selects json, yaml, csv, python or xml. output.indent accepts a number from 0 to 8 or the string tab; 0 means compact output. sort_keys, ensure_ascii, include.parsed_data and include.stats are also available.

Request example
curl -X POST https://json-tools.ru/api/v1/format \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "{ user: '\''ivan'\'', active: true, }",
    "input": { "mode": "auto", "strict_json": false },
    "output": { "format": "json", "indent": 2 },
    "include": { "stats": true }
  }'
Useful API links

The API index is available at /api/, the OpenAPI schema at /api/openapi.json, and the interactive FastAPI documentation at /api/docs. Current limits are available through GET /api/v1/limits.

Errors and limits

Public API errors are returned as application/problem+json. Oversized input returns HTTP 413, parse errors and invalid JSONPath return HTTP 422. Input text limit: 1000000 bytes; maximum search results: 500.