Конвертируйте CSV таблицу в JSON массив
Tool guide
The data arrived as a spreadsheet but your code wants JSON: seed rows for a database, a mock for the front end, a request body, a lookup list for a form. This page reads the first CSV line as field names, turns every following line into an object and collects them into one array. Values stay as strings, so a product code with a leading zero is not silently reinterpreted as a number. The conversion runs in your tab. See also: take the objects back into a spreadsheet, check the resulting JSON for errors, tidy the source CSV before parsing it.
Because types are not guessed. In a spreadsheet "007" and "7" look different but are both text, and coercing everything to numbers would destroy product codes, phone numbers and postal codes with leading zeros. If you need real numbers, cast the fields you care about on your side — Number(row.qty) in JavaScript or int() when loading in Python.
The first line is used as the key names anyway, so you get objects keyed by "1" and "Alex" and you silently lose that first record. The easy fix is to add a header line before pasting: one comma-separated line of sensible field names makes the output usable by code.
Wrapping the value in double quotes is enough: parsing follows RFC 4180, so such a field is not split. A quoted value may hold commas and line breaks, and a quote inside it is doubled — "he said ""yes""". An unclosed quote does not corrupt the data silently: the conversion stops with an error message. A bare comma in an unquoted value will still break the row, so add the quotes in the source export.
No — the output is always flat: one table row becomes one object with no nesting. CSV is a two-dimensional format, and a column named user.address.city stays a key that merely contains dots. Build the nesting in your own code after the conversion, or hand-write the JSON.
As a request body, yes, provided the endpoint expects an array of objects and tolerates string values. Many APIs enforce numbers and booleans through a schema, so validate or cast before sending. Every object carries the same keys: a short row is padded with empty values, trailing extra fields are dropped, and an empty cell produces an empty string rather than null.
A few thousand rows convert with no perceptible delay; tens of thousands introduce a visible pause, because both the source and the result sit in text fields in full. For very large exports a five-line script on your own machine is the better tool — use this page for quick batches and format checks.
It stays in the input field of your own tab. The page script does the parsing and array building, and the download button assembles the file locally, so nothing leaves the device — a customer list or an order export is safe to convert here. Reloading the page clears both fields.
Before: id,name,role 1,Alex,admin 2,Maria,editor
After: [{"id":"1","name":"Alex","role":"admin"},{"id":"2","name":"Maria","role":"editor"}] Before: sku,qty 007,12
After: [{"sku":"007","qty":"12"}] — the zero survives because values stay strings Your rating and feedback help decide what to improve next.