Built on advanced on-device AI and hardware acceleration to deliver professional-grade performance with uncompromising privacy.On-device AI — professional-grade, fully private.
CSV to JSON
Convert CSV to JSON on your device — objects, JSON Lines, typed values, nested keys.
- No upload
- 5 output shapes
- Real numbers & booleans
- Up to 25 MB free
Drop a CSV file here
.csv .tsv .txt .psv · up to 25.0 MB free
What the top level of the document is. Each one is a different file, not a different layout.
Two spaces reads well in a diff; minified is smallest.
Leading zeros, long ids, phone numbers, Infinity and NaN are always left as text.
What an empty cell becomes.
Auto reads the file: only values that name their own convention get a vote.
Duplicate headers are renamed and blank ones are numbered, so no column is lost.
Detected from the file. Override any of them if the preview looks wrong.
A batch downloads as one ZIP. Combining merges every file into a single document.
Free: 1 file at a time, up to 25.0 MB. Every output shape and option is included.
How to convert CSV to JSON
- 1
Add your CSV
Drop or browse for a .csv, .tsv, .txt or .psv file. The delimiter, quote character and encoding are detected from the file and shown so you can override any of them.
- 2
Choose the output shape
Array of objects for an API, JSON Lines for a database import, a keyed hash for lookups, column arrays for a dataframe, or array of arrays for a matrix.
- 3
Decide how values are read
Turn type inference on to get real numbers, booleans and null instead of strings, and choose whether a blank cell becomes null, an empty string, or is left out.
- 4
Convert and export
Press Convert, then copy the whole document to the clipboard or download it. It all runs on your device, not our servers.
What this CSV → JSON flow gives you
Built for spreadsheet-to-API handoffs: control how rows split, how bytes decode, what each value becomes, and how headers turn into keys — then grab clipboard-friendly JSON or a downloadable file without leaving your machine.
- Five output shapes, not one — An array of objects for an API, JSON Lines for a database import, a keyed hash for lookups, column arrays for a dataframe, or an array of arrays for matrix data.
- Real values, not strings — Numbers, booleans and null come out as JSON values rather than quoted text — with the cases that would lose information protected.
- Delimiter and quote you can dial in — Auto-detect from the file or force comma, semicolon, tab or pipe, with the quote character set to double, single or none for exports that break the usual rules.
- Encoding that fixes garbled text — Byte-order marks are honoured over your choice, UTF-16 exports from Excel read correctly, and ISO-8859-1 is a real Latin-1 decoder rather than an alias.
- Objects, matrices or nested records — Toggle first row as keys for { "column": "value" } rows, keep a 2D array when you already normalize in code, or fold dotted headers into nested objects.
- Copy, download, repeat — Pretty-printed JSON is ready for Postman, jq, or committing to repos—regenerate instantly after tweaks.
- Privacy-first execution — The preview appears as soon as the file is read — no queue, no upload, no waiting.
Choosing an output shape
The shape decides what the top level of the document is, and the right one depends entirely on what will read it. Each is a different file, not a different formatting of the same file.
- Array of objects — [{ "id": 1, "name": "Ada" }] — the default, and what an HTTP API, a JavaScript app or a typed struct expects.
- Array of arrays — [["id","name"],[1,"Ada"]] — every cell by position, with no header row consumed. Right for matrix data, or a file whose headers are duplicated or missing.
- JSON Lines (NDJSON) — One complete record per line, with no enclosing brackets and no commas between records. This is what mongoimport, BigQuery and most log pipelines take, and it is never pretty-printed — a record spanning lines breaks the format.
- Keyed hash — { "SKU-1": { … } } — an index, keyed on the column you pick. Right when the consumer looks records up by id rather than iterating them. Two rows sharing a key value cannot both survive, so the tool reports how many were dropped.
- Column arrays — { "id": [1,2], "name": ["Ada","Grace"] } — column-major, which is what pandas, Arrow and most charting libraries want, and far smaller than row objects when a file has many columns.
How values become JSON types
With type inference on, each cell is read as the JSON value it actually is rather than being quoted as text. The interesting part is not what gets converted — it is what deliberately does not, because every one of these is a value a naive converter silently damages.
What is converted
- Numbers — Integers, decimals and exponents, with thousands separators removed and both the 1,234.56 and 1.234,56 conventions understood. Accounting parentheses are read as negatives, so (1,234.50) becomes -1234.5.
- Booleans — true, false, TRUE, FALSE, True and False all become real JSON booleans. TRUE and FALSE are what a spreadsheet writes; the lower-case forms are what everything else writes.
- Null — An empty cell becomes null by default, and the literal text null or NULL — what a database export writes — becomes null too.
- Embedded JSON, on request — A cell that is itself a JSON array or object can be parsed rather than quoted, which is what makes an Airtable or Notion export usable. It is off by default, because an address field containing a brace is not a data structure.
What is deliberately left as text
- Leading zeros — 007 and 00123 stay strings. Converting them to 7 and 123 cannot be undone, and a part number or a postal code is not a quantity.
- Long identifiers — A card number, IMEI or database id longer than fifteen significant digits stays a string. As a JSON number, 12345678901234567890 becomes 12345678901234567000 — quietly, and with no error.
- Leading plus signs — +15551234567 is a phone number, not a positive integer, and dropping the plus changes what it means.
- Infinity and NaN — Neither is valid JSON. A converter that passes them through does not produce a broken file — it produces a valid file where those cells have silently become null.
- Dates — JSON has no date type, so 2024-01-15 stays exactly the string the file contained. Anything else would be a guess about a format the file never stated.
- Currency and percentages — $50 and 12% keep their symbols. Stripping them changes the value's meaning and there is nowhere in JSON to record that a number was a percentage.
Header rows, keys and collisions
The header row is where a converter is most likely to lose data quietly, because every failure here still produces a well-formed document — just one with a column missing. These are handled rather than ignored, and each is reported next to the file.
- Duplicate headers — A file with two columns called id would otherwise write the second over the first. The later one is renamed id_2, and the tool says how many were renamed.
- Blank headers — An empty header cell becomes column_4, numbered by its position in the file so it is obvious which column it is.
- Short header rows — If the body is wider than the header, the extra columns are named rather than dropped — losing values because a header row was short is not something you can see in the output.
- Key case — Leave names exactly as the file wrote them, or convert to lower case, upper case, camelCase or snake_case. Renaming is opt-in: a converter should not rename things by default.
- Reserved-looking names — A column called __proto__ or constructor keeps its exact name. The document is written directly as text rather than assembled into JavaScript objects, so names that would be unassignable in code round-trip correctly.
Nested JSON from dotted headers
Exports from CRMs and form builders often write nested data as flat columns named address.city and address.zip. Turning nesting on folds those back into a real object, so the JSON matches the shape the data had before it was flattened.
- Dot or slash — Either separator can be used, and it is off by default — a column legitimately called Revenue.2024 should not become an object unless you ask.
- Any depth — a.b.c.d nests four levels. Empty segments collapse, so a..b is the same as a.b.
- No column is ever lost — If a file has both address and address.city, one name cannot be a value and an object at once. Rather than dropping either, the dotted columns keep their original flat names and the tool names the columns it could not nest.
- Nothing is renamed — The alternative to keeping a column flat would be inventing a name for it, which makes the JSON not match the file. Every key in the output is either a header the file contained or an explicit column_N for one it did not.
Parsing options explained
Each control changes how characters become fields and how fields become JSON properties. They are applied to the file as you change them, so the preview always shows the current settings.
- Delimiter — Auto scores comma, semicolon, tab and pipe on how rectangular each reading makes the file, not on how often the character appears — so commas inside quoted fields do not swing the result. Manual mode overrides stubborn files.
- Quote character — Double quotes are the standard, but files quoted with apostrophes exist, and so do files with no quoting at all where an apostrophe in a name would otherwise be read as one. A quote only opens a field at the start of that field, which is what keeps O'Brien intact.
- Skip leading rows — Reports often carry a title and a blank line above the real header. Skipping them makes the correct row the header, and rows are counted as rows — a title containing a line break is still one row.
- First row as keys — Maps headers to JSON keys; turn it off when the file has no header and every row is data, and the columns are named column_1 upward instead.
- Trim whitespace — On by default, so a padded fixed-width export reads ' 42 ' as the number 42. Turn it off when the spacing in a cell is deliberate.
- Blank cells — A blank becomes null, an empty string, or the key is left out of the record entirely. In the positional shapes — arrays and column arrays — leaving a value out would shift every later column, so a blank stays null there.
When to use each file encoding
If letters or currency symbols look wrong in the preview, pick a different decoder. Auto handles almost everything; the manual options are for the files it cannot know about.
- Auto — Reads a byte-order mark if the file has one, then checks whether the bytes are valid UTF-8, then falls back to Windows-1252 — which is what a Western-locale spreadsheet writes when it is not asked for anything else.
- UTF-8 — Default for data warehouses, SaaS exports, and anything saved as Unicode. A UTF-8 byte-order mark is stripped rather than becoming part of the first key.
- UTF-16LE and UTF-16BE — What 'Unicode Text' export produces. Read as UTF-8 by mistake, such a file becomes a single enormous column of null characters.
- Windows-1252 — Typical for Excel-on-Windows CSV in Western European locales, where 0x92 is a curly apostrophe.
- ISO-8859-1 — A true Latin-1 decoder, where every byte maps to the code point of the same value. Most tools list this as a separate option and then hand you Windows-1252, because the web encoding standard treats the name as an alias for it — here it is the real thing, for files where 0x80–0x9F are control codes rather than punctuation.
Batch conversion and combining files
One file at a time is free, up to 25 MB. Pro adds the scale and delivery options — the conversion itself, and every option that affects correctness, is identical on both plans.
- Up to 50 files — Queue a folder of exports and convert them in one pass, each with its own detected delimiter, encoding and header row.
- One ZIP download — A batch downloads as a single archive rather than fifty save dialogs. File names are made safe for extraction, so a name from an untrusted export cannot write outside the folder it is unpacked into.
- Combine into one document — Merge every queued file into a single array of objects, or a single JSON Lines file. Each file is read with its own header row, so file two's third column is never written under file one's third heading.
- Everything else is free — All five output shapes, type inference, nesting, key transforms, per-column overrides, every encoding and every indent are available on the free plan.
Why convert CSV to JSON?
JSON is the lingua franca of REST APIs, serverless functions, and NoSQL loaders. Moving CSV to JSON lets you validate shapes, diff outputs, and pipe rows into apps without rewriting parsers in every language.
- API and automation ready — Feed the same structure into fetch bodies, CLI tools, or document stores.
- Structured for code — Arrays and objects map cleanly to TypeScript, Python, or Go types after conversion.
- Typed, so it survives the trip — A JSON number is a number to every consumer. A CSV cell is text to all of them, and every consumer then guesses differently.
- Diffable — Pretty-printed JSON with one value per line produces a readable diff, which a single-line CSV row does not.
How the conversion works
The file is read as bytes, decoded with the encoding the file declares or you choose, scanned into rows, and written straight out as JSON text. There is no intermediate spreadsheet and no round trip through a server.
- Decode — The byte-order mark is read first and wins over the dropdown, because a mark is the file stating its own encoding. Without one, valid UTF-8 is detected and Windows-1252 is the fallback.
- Detect and split — The delimiter and quote character are scored together on a sample, and the winner plus the runner-up are both shown so a close call is visible rather than silent. Quoted fields may contain delimiters and line breaks.
- Type — Each cell is classified against a grammar rather than handed to a permissive built-in parser, which is what keeps 007, 10-20 and +1 intact instead of turning them into 7, a date and 1.
- Write — The document is written in blocks and assembled as a file rather than as one enormous string, which is why a 27 MB result does not freeze the page. The output is byte-for-byte what the language's own serializer would produce.
Conversion runs on your device, off the main thread, and writes the document in blocks rather than building it in one piece — so a 10 MB export converts in about half a second and the page never stops responding.
Frequently asked questions
How do I convert CSV to JSON?
Drop a .csv, .tsv, .txt or .psv file, choose an output shape and decide whether the first row becomes object keys. The preview updates as you change any setting, so you can see the exact JSON before committing. Press Convert and the tool produces the full document, which you can copy to the clipboard or download as a .json file — all without the file leaving your device.
What does 'first row as keys' change in the output?
When enabled, the header row supplies property names and every following row becomes a JSON object, giving an array of { "column": "value" } records ready for APIs. When disabled, the first row is treated as data and the columns are named column_1, column_2 and so on, so nothing is lost. Choosing the array-of-arrays shape instead preserves every cell by position — useful for matrix data.
Why are my columns split incorrectly?
The chosen delimiter probably does not match the file. Auto-detect scores comma, semicolon, tab and pipe on how rectangular each reading makes the file rather than on how often the character appears, so a comma inside a quoted address does not swing the vote. You can still force a delimiter, and force the quote character to double, single or none, until the columns line up.
Which file encodings are supported?
Auto-detection reads any byte-order mark first and falls back to UTF-8, then Windows-1252. You can also force UTF-8, UTF-16LE, UTF-16BE, Windows-1252 or ISO-8859-1. A byte-order mark always overrides the dropdown, because a mark is the file stating its own encoding while a dropdown is a guess — and the tool tells you when that happened rather than silently doing the right thing.
Does it turn numbers into real JSON numbers?
Yes, and it refuses to do so where that would destroy information. A part number like 007 keeps its leading zeros, a twenty-digit card number stays a string rather than losing its last digits to floating-point rounding, a phone number written +15551234567 keeps its plus sign, and Infinity and NaN stay strings because neither is valid JSON. TRUE and FALSE become booleans and NULL becomes null. Dates stay strings, because JSON has no date type and any conversion would be a guess.
Can it build nested JSON from my headers?
Yes. Headers written address.city and address.zip can be folded into a nested address object, which is how exports from most CRMs come out. Slash-separated headers work the same way. If a file has both a column called address and a column called address.city, the two cannot occupy the same place in one document, so the dotted columns keep their original flat names and the tool tells you which ones — no column is ever dropped or renamed to make nesting work.
Is my CSV uploaded anywhere?
No. The file is read, parsed and written entirely on your device, and the finished document is handed straight to a download or the clipboard. That keeps confidential exports private, lets the tool work offline once loaded, and makes it usable on phones and tablets as well as desktops.
Is it free, and can it handle large files?
Yes, it is free. The free tier converts one file at a time up to 25 MB, which is roughly 250,000 rows of a typical export, with every output shape and every option available. Conversion runs off the main thread, so the page stays responsive and the preview keeps updating while a large file is being written. Pro adds batch conversion of up to 50 files, a single ZIP download, and combining a batch into one document.
from 186 ratings
Rate this tool
Tap a star — it takes a second