Конвертер CSV в JSON

Мгновенно преобразует CSV в красиво отформатированный JSON.

// about

Об этом инструменте

Преобразует данные CSV из таблиц в формат JSON и обратно. Идеально для переноса данных между Excel и веб-приложениями.

Как использовать

  1. Вставьте текст CSV или JSON.
  2. Укажите разделитель (по умолчанию запятая).
  3. Нажмите 'Конвертировать' и скопируйте результат.

Зачем используют этот инструмент

  • Упрощает обмен данными между таблицами Excel и веб-сервисами.
  • Поддерживает разделители колонок запятой и точкой с запятой.
  • Быстрая конвертация без установки Excel или плагинов.

Часто задаваемые вопросы (FAQ)

Что такое файл CSV?

Это текстовая таблица, где значения разделены запятыми.

Нужна ли первая строка с заголовками?

Названия колонок в первой строке станут ключами объектов в JSON.

Какой разделитель выбрать?

Обычно используется запятая (,), но в некоторых регионах — точка с запятой (;).

Руководства · Данные · 7 мин чтения

CSV или JSON: когда что использовать и на что смотреть при конвертации

Чтобы отправить выгрузку из таблицы в API или открыть ответ API в Excel, нужно конвертировать между CSV и JSON. Если знать различия форматов, данные не испортятся по дороге.

CSV (Comma-Separated Values) — это таблица. В первой строке названия столбцов, каждая следующая строка — запись, значения разделены запятыми. Это самый простой и лёгкий способ хранить плоские данные, где у каждой строки одинаковые столбцы.

name,city,score
Kim,Seoul,92
Lee,Busan,85

[
  {"name": "Kim", "city": "Seoul", "score": 92},
  {"name": "Lee", "city": "Busan", "score": 85}
]
Различия в структуре CSV и JSON, почему Excel искажает CSV в UTF-8, правила экранирования запятых и кавычек и как «расплющить» вложенные данные.
Читать →
Сделать с ИИ

Создайте этот инструмент сами с помощью ИИ

Нужна своя версия? Скопируйте промпт в чат с ИИ или сохраните файл навыка для ИИ-агента. В них описаны функции, особые случаи и тесты, которые мы использовали.

Промпт и навык даны на английском — ИИ-инструменты хорошо его понимают.

Промпт-задание для ИИ

Вставьте как есть в Claude, ChatGPT или Gemini.

You are an experienced full-stack web developer. Build a web tool called "Конвертер CSV в JSON" that meets the requirements below.

## Goal

Build a converter between CSV and JSON.

## Core features

- CSV → JSON (array of objects) and JSON → CSV
- Auto-detect comma, semicolon or tab delimiters
- Header row on/off
- Optional conversion of numbers and booleans
- Download CSV with a UTF-8 BOM for Excel

## Inputs

- CSV or JSON text/file
- Delimiter, header and type options

## Outputs

- Converted data
- Row and column counts

## Edge cases and handling rules

- Follow RFC 4180 for quoted commas, line breaks and doubled quotes
- Keep values with leading zeros (postal codes) as strings
- Flatten nested JSON into dotted columns (user.name)
- Warn when rows have different column counts

## Implementation requirements

- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.
- Make the UI responsive and easy to use on mobile; label every input and keep everything keyboard accessible.
- Add a Copy button for results and show clear, friendly error messages for invalid input.
- Keep the core logic in functions separate from the UI so it can be unit-tested.

## Definition of done (test cases)

- '"Seoul, Korea"' stays a single value
- '01234' is not turned into a number
- Round-tripping keeps the same row count

First outline your implementation plan in at most five lines, then write the complete code, and finally explain how to check the test cases above.

Навык (SKILL.md)

Сохраните как .claude/skills/build-csv-json-converter/SKILL.md, чтобы агенты вроде Claude Code использовали его при каждой доработке инструмента.

---
name: build-csv-json-converter
description: Use when building or changing a Конвертер CSV в JSON tool. Build a converter between CSV and JSON.
---

# Build: Конвертер CSV в JSON

## Goal

Build a converter between CSV and JSON.

## Workflow

1. Review the required features, inputs and outputs below and ask about anything missing first.
2. Implement the core logic as pure functions separate from the UI.
3. Check the logic against the test cases in the verification list.
4. Build a responsive UI with an input form, a result area and a Copy button.
5. Reproduce each edge case listed under Rules and refine the error messages.

## Core features

- CSV → JSON (array of objects) and JSON → CSV
- Auto-detect comma, semicolon or tab delimiters
- Header row on/off
- Optional conversion of numbers and booleans
- Download CSV with a UTF-8 BOM for Excel

## Inputs

- CSV or JSON text/file
- Delimiter, header and type options

## Outputs

- Converted data
- Row and column counts

## Rules

- Follow RFC 4180 for quoted commas, line breaks and doubled quotes
- Keep values with leading zeros (postal codes) as strings
- Flatten nested JSON into dotted columns (user.name)
- Warn when rows have different column counts
- Build it as a single page (HTML, CSS, JavaScript) that runs entirely in the browser, and never send the user's input to a server.

## Verification

- [ ] '"Seoul, Korea"' stays a single value
- [ ] '01234' is not turned into a number
- [ ] Round-tripping keeps the same row count

Советы по работе с ИИ

  • Укажите стек (React, Vue или чистый HTML) в первой строке, чтобы код подошёл к проекту.
  • Попросите ИИ выполнить перечисленные тесты и показать результаты до принятия кода.
  • Не вставляйте настоящие пароли, данные клиентов и API-ключи; используйте примеры.