json-tools .ru
Format
Source text Paste text or upload a file
Result Type is not detected yet
Statistics appear after formatting

JSON → CSV

JSON to CSV online converter — json-tools.ru

Convert JSON to CSV with input validation and readable output.

When to use it

The converter first parses JSON into a normalized structure, then renders it as CSV. This is useful when moving data between APIs, configs, logs, and working scripts.

JSON input

JSON input mode requires valid JSON with double quotes, arrays, objects, numbers, booleans, and null.

CSV output

CSV output is built for an object or an array of objects; nested fields become dot-separated columns.

Practical notes

CSV output is available only for an object or an array of objects; deeply nested arrays stay as JSON strings inside cells.

All tools

Data converters and formatters

Quick pages for common tasks: formatting one data type and converting between JSON, YAML, CSV, Python dict and XML.

Formatters

Converters

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, YAML, CSV, Python либо XML. При явном выборе сервис валидирует данные выбранным парсером: например, страница /xml-to-json требует XML на входе и показывает ошибку, если вставлен другой формат.

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, CSV и обычный текст

YAML принимается, если он распознан как объект или массив. XML разбирается отдельно и переводится в JSON-подобную структуру. CSV во входном режиме читается как таблица с заголовками и превращается в массив объектов. Если ни один структурный формат не подошел, ввод считается обычной строкой.

Settings and result

Output and indentation

Ввод выбирает парсер исходных данных, Вывод выбирает формат результата: JSON, YAML, CSV, Python или XML. Отступ управляет итоговым кодом: компактно, 2 пробела, 4 пробела или Tab. Кнопка Минифицировать отправляет тот же ввод с отступом 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 switcher in the top bar opens the language version of the current page. Russian pages are available under /ru/, English pages under /en/.

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 задает парсер: auto, json, js_like, python, yaml, xml, csv или text. input.strict_json требует строгий JSON. output.format выбирает json, yaml, csv, python или xml. output.indent принимает число 0..8 или строку tab; 0 означает компактный вывод. Также доступны sort_keys, ensure_ascii, include.parsed_data и include.stats.

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.