CSV/JSON Converter

Convert CSV, nested JSON, XML and Excel tables, with optional types and three JSON output shapes.

On-device No sign-up Free to use

Convert table data controls

Showing an example. Edit to see your own.

?

Paste delimited text, a JSON array of flat rows, or flat XML. Everything runs in your browser.

Drop your table file here

or choose one from your device

One CSV, TSV, text or .xlsx file up to 20 MiB. A chosen file is read instead of the text box, and the summary says so.

    ?

    Every key must be nonblank and unique. Nothing is overwritten.

    ?

    Without a names row, columns are named column_1, column_2 and so on.

    ?

    Leading-zero IDs and long numeric strings stay text. Exact lowercase true, false and null become JSON values. Turn off to preserve all strings.

    ?

    CSV output can prefix formula-like text. The prefix changes stored values; review the import in your spreadsheet. XLSX output stores values as text cells rather than formulas.

    More options
    ?

    Used only when Delimiter is set to Another character. Enter one character, such as ^.

    ?

    For an .xlsx file: the sheet name or its position, such as 2. Leave empty for the first visible sheet.

    ?

    The stored value is what the spreadsheet last calculated. The formula text appears with a leading = and is never calculated here.

    ?

    Used when reading and writing delimited text. Change it only for a file that uses the other character.

    ?

    Used for the CSV and XML downloads. A workbook download holds UTF-8 XML inside the file.

    ?

    One exact header name per line. Blank keeps every column. The preview and download use this order.

    ?

    One per line: column | string, number, boolean, null or json. String preserves original text. Numbers over 15 significant digits are refused. Boolean reads true, false, 1 or 0; null reads blank or null.

    ?

    For JSON input, select an array inside an object using a dot-separated path such as data.items. Leave blank for a top-level array.

    Processed in your browser. Your inputs stay on this device.

    Result

    Showing an example.

    Convert two product rows to JSON objects with numeric quantities.

    [
      {
        "item": "Pencils",
        "quantity": 3
      },
      {
        "item": "Notebooks",
        "quantity": 2
      }
    ]

    Loading the tool. Your result will appear here.

    https://usefreetools.net/csv-json-converter · 20 November 2026

    Was this helpful?

    How to use CSV/JSON Converter

    1. Choose the conversion direction for delimited text, JSON, XML or an Excel workbook.
    2. Paste the source or choose its file. A selected file replaces pasted text. For XLSX input, choose the worksheet and whether to read stored formula results or formula text.
    3. Set applicable delimiters, quoting, headers and encodings. For JSON output, choose strings or supported inferred types and an array-of-objects, array-of-arrays or unique-keyed shape.
    4. For JSON-to-CSV, check how supported nested objects and array positions become column paths. JSON-to-XML and JSON-to-XLSX require flat records.
    5. Convert and review row/column counts, warnings and identifier values before copying or downloading. For CSV output, choose the formula-prefix policy that fits the destination.

    Example: CSV/JSON Converter

    Convert two product rows to JSON objects with numeric quantities.

    You add
    Conversion: csv-to-json; Input: item,quantity Pencils,3 Notebooks,2; Formula cells in a workbook: cached; The first row holds the column names: true; Infer numbers, booleans and literal null: true; JSON output shape: objects; Quote character: "; Quoting in the CSV output: minimal; Protect spreadsheet formulas: quote; Encoding of a chosen file: auto; Encoding of the ready file: utf-8
    You get
    [ { "item": "Pencils", "quantity": 3 }, { "item": "Notebooks", "quantity": 2 } ]

    Options

    Input
    Paste the source for the selected conversion. JSON-to-CSV can flatten supported nested objects and array positions; XML and XLSX output require flat records. Processing happens in this browser.
    Custom delimiter character
    Used only when Delimiter is set to Another character. Enter one character, such as ^.
    Worksheet
    For an .xlsx file: the sheet name or its position, such as 2. Leave empty for the first visible sheet.
    Formula cells in a workbook
    The stored value is what the spreadsheet last calculated. The formula text appears with a leading = and is never calculated here.
    The first row holds the column names
    Without a names row, columns are named column_1, column_2 and so on.
    Infer numbers, booleans and literal null
    Leading-zero IDs and long numeric strings stay text. Exact lowercase true, false and null become JSON values. Turn off to preserve all strings.
    Key column for keyed JSON (blank uses first)
    Every key must be nonblank and unique. Nothing is overwritten.
    Quote character
    Used when reading and writing delimited text. Change it only for a file that uses the other character.
    Protect spreadsheet formulas
    CSV output can prefix formula-like text with an apostrophe or space. This changes stored values and reduces risk in some spreadsheet imports, without guaranteeing behavior after editing or saving elsewhere. XLSX output stores values as inert text cells rather than formulas.
    Encoding of the ready file
    Used for the CSV and XML downloads. A workbook download holds UTF-8 XML inside the file.
    Column type overrides
    For CSV-to-JSON, set each column to string, number, boolean, null or json. A string override preserves original CSV text; numeric overrides refuse more than 15 significant digits.
    Column selection, NDJSON and nested paths
    List exact headers one per line in export order. JSON output may be NDJSON, one row per line, and NDJSON input can export delimited text. Select an array inside a JSON document with a dot-separated path such as data.items.

    Supported inputs and limits

    • Text input: 10,000,000 characters and 200,000 rows; chosen file: 20 MiB.
    • XLSX uses bounded streaming ZIP/XML readers, up to 2,000 parts, 96 MiB expanded, 32 MiB per part, 500 columns and 2,000,000 cells.
    • CSV/Excel/XML to JSON detects simple numbers, booleans and null by default; identifiers and long numbers stay text.
    • JSON-to-CSV flattens supported nested objects/arrays with collision and depth checks.
    • JSON-to-XML/XLSX still needs flat records.
    More details

    Recognized Excel date/time styles become ISO values; cached formulas are never recalculated.

    Missing caches or merged worksheets refuse table conversion.

    XLSX output stores inert text, at most 400,000 cells.

    Column selection affects the preview and export.

    Nested array paths do not support keys containing dots or bracket syntax.

    NDJSON requires one complete JSON row per nonblank line.

    A bad line stops the conversion.

    Where your input is processed

    This tool does not upload your inputs. See the limits for anything saved on your device.

    Why the formula guard changes your cells

    A spreadsheet may interpret CSV text beginning with =, +, - or @ as a formula. The selected guard prefixes risky values, so the exported text differs from the original. An application can remove or reinterpret that prefix after editing or saving; review how the destination imports the file. Off preserves the text when a prefix would break another non-spreadsheet workflow.

    Why an .xlsx download needs no formula guard

    The writer stores every cell as an inline string, so a value that begins with = is a piece of text in the file rather than a formula to run. That is also why the workbook download keeps a value such as 0012 exactly as text. Read the file back here and a formula-looking cell comes out unchanged, which makes the round trip predictable.

    What is read before a workbook is unpacked

    The ZIP directory is read first: the number of parts, the size each part expands to, and the name of every part. A file that claims to expand far past its stored size, carries a password, holds a macro part, or hides a name outside the package is refused before any part is unpacked. Worksheet XML is then read against the spreadsheet namespace, so an element from another namespace is ignored rather than treated as a row.

    Questions about CSV/JSON Converter

    Can I keep all CSV values as strings?

    Yes. Turn off type conversion. With conversion on, simple numbers, true/false and null receive JSON types; leading-zero identifiers and long numbers remain strings.

    What happens to nested JSON?

    JSON-to-CSV flattens supported objects and array positions into column paths. Ambiguous path collisions and excessive nesting are refused. JSON-to-XML or XLSX still requires flat records.

    Can JSON be keyed by one column?

    Yes. Choose keyed-object output and a nonblank, unique key column. Duplicate keys are refused; no row is overwritten.

    How are workbook dates and formulas read?

    Recognized date/time styles become ISO values. Saved formula results are read without recalculation, and missing results or merged worksheets refuse table conversion.

    Page updated · Project managed by Tony Hines · Report a problem with CSV/JSON Converter

    Related reading

    All guides