Convexy

How to convert CSV to JSON on iPhone

The output is an array of objects, one per row, keyed by the header row. Everything else on this page is about the parts CSV gets wrong — because CSV is a far worse-specified format than people assume.

The shape you get

Take this CSV:

name,city,age
Ada,London,36
Grace,New York,45

You get this JSON — an array, one object per data row, with the header row as the keys:

[
  {
    "age" : "36",
    "city" : "London",
    "name" : "Ada"
  },
  {
    "age" : "45",
    "city" : "New York",
    "name" : "Grace"
  }
]

It is pretty-printed, so it is readable as it stands, and the keys come out in alphabetical order rather than column order. JSON objects have no inherent order, so nothing has been lost — but if you were expecting the columns in their original sequence, that is why they are not.

Every value is a string. That is a decision, not a bug.

Notice "age" : "36" — quoted. Not 36. Convexy does not guess types, and it is worth understanding why, because the converters that do guess will eventually ruin your data.

A CSV file contains no type information whatsoever. Every cell is text. When a converter decides that 36 should become a number, it is applying a heuristic — and the heuristic is wrong in exactly the cases that matter:

Convexy takes the position that a converter should not silently rewrite your data. You get exactly what was in the file, as text. If your consuming code needs numbers, it can cast them — that is a decision your code is qualified to make and a file converter is not.

The traps in CSV itself

CSV looks trivial and is not. There is no single standard; it is a folk format. These are the things that will bite you, and how Convexy behaves in each case:

CSVs are the files most likely to hold something you are contractually obliged to protect — customer exports, transaction lists, payroll, a CRM dump. Convexy converts them on the device. There is no upload, no account, and no server that could retain a copy, and it works with the network turned off. Pasting a customer list into a free online CSV-to-JSON converter is, for most companies, a reportable event.

Check the output. Seriously.

The failure mode with tabular data is not a crash — it is a file that looks fine and is subtly misaligned. Open the JSON and confirm the record count matches your row count, and that the last record is complete. If those two things are right, the parse held. The reverse conversion is available too, and round-tripping is a decent sanity check.

How to do it

  1. Make sure the CSV has a header row

    The first line becomes the JSON keys. If your file starts with data, add a header line first or you will lose that row.

  2. Bring the CSV into Convexy

    Tap Browse files and pick the .csv, or share it into Convexy from Files, Mail or Numbers.

  3. Choose JSON

    Convexy shows only what a CSV can become: JSON and TXT. Tap JSON.

  4. Convert

    Tap Convert. The output is pretty-printed, so it is readable without any further formatting step.

  5. Verify the record count

    Open the result and check the number of objects matches your number of data rows. A mismatch means a field with an embedded newline split a row. Then save or share it.

Common questions

Why are the numbers in my JSON quoted as strings?

Because a CSV file contains no types — every cell in it is text, and any converter that turns 36 into a number is guessing. That guess destroys data in the cases you most care about: zip codes lose their leading zeros, long account numbers lose precision, and 1.10 becomes 1.1. Convexy gives you exactly what was in the file and lets your code decide what is a number. It is the conservative choice and it is the correct one.

What is the JSON structure exactly?

A top-level array. One object per data row. The keys are the values from the header row, and every value is a string. Keys appear in alphabetical order, which does not matter to any JSON parser but is worth knowing if you are reading the file by eye.

My CSV has cells with line breaks in them. Will it work?

Probably not. A quoted field containing a newline will be read as two separate rows, misaligning everything after it. This is the most common way a real CSV export breaks a converter, and Convexy does not handle it. Check that the number of objects in the output matches the number of rows in your file — if it does not, this is why.

What if my CSV has no header row?

The first line is always used as the header. Without one, your first record silently becomes the set of keys and disappears from the data. Add a header row before converting.

My file uses semicolons instead of commas. Does that work?

No. Convexy splits on commas. A semicolon-separated file — common from European versions of Excel — converts into a single column whose values are the whole line. Re-export the file as comma-separated, which Excel and Numbers both offer.

Is my spreadsheet uploaded anywhere?

No. There is no server behind Convexy and no account. The conversion runs on your iPhone and works in Airplane Mode, which matters when the file is a customer list, a payroll export or a bank statement.