Convert CSV format into JSON format

Please log in or register to do it.

This tool converts CSV format into JSON format. It processes your CSV text and transforms it into JSON. You can choose from several conversion modes: • Convert CSV with a header row (using the first row as keys). • Convert CSV without a header row (generating generic keys like "column1", "column2", etc.). • Use a custom delimiter for parsing the CSV data. • Produce pretty printed JSON output with configurable indentation. Simply enter your CSV text, select the desired conversion mode below, adjust its settings if needed, and click the process button.

Conversion Modes:


Treats the first row as header fields and converts each subsequent row into a JSON object using these headers as keys.

Assumes no header row and generates generic keys (e.g., "column1", "column2", etc.) for each row.

Uses a custom field delimiter (other than a comma) for parsing the CSV data. Enter your delimiter below (e.g., ; or \t for tab).

Converts CSV (with header row) to JSON and outputs a formatted JSON string. Enter the number of spaces for indentation (e.g., 2).

Examples:

CSV with Header Row

Converts CSV text where the first row contains header fields.

Before:
name,age,city
Alice,30,New York
Bob,25,Los Angeles
After:
[{"name":"Alice","age":"30","city":"New York"},{"name":"Bob","age":"25","city":"Los Angeles"}]

CSV without Header Row

Converts CSV text with no header row, generating keys like "column1", "column2", etc.

Before:
Alice,30,New York
Bob,25,Los Angeles
After:
[{"column1":"Alice","column2":"30","column3":"New York"},{"column1":"Bob","column2":"25","column3":"Los Angeles"}]

Custom Delimiter Conversion

Converts CSV text that uses a custom delimiter (in this example, a semicolon).

Before:
name;age;city
Alice;30;New York
Bob;25;Los Angeles
After:
[{"name":"Alice","age":"30","city":"New York"},{"name":"Bob","age":"25","city":"Los Angeles"}]

Pretty Printed JSON

Converts CSV with header row to JSON and outputs the JSON in a pretty printed format.

Before:
name,age,city
Alice,30,New York
Bob,25,Los Angeles
After (Indentation: 2):
[
  {
    "name": "Alice",
    "age": "30",
    "city": "New York"
  },
  {
    "name": "Bob",
    "age": "25",
    "city": "Los Angeles"
  }
]
Convert spaces before punctuation into nothing
Convert text into URL encoding

Your email address will not be published. Required fields are marked *