TutorialsJSON resources
9 min read

Convert JSON to CSV in Notepad++: Easy Methods (2026)

Convert JSON to CSV in Notepad++: Easy Methods (2026)

Notepad can't convert JSON to CSV with its built-in features. You need the JsonTools plugin, an online converter, or a Python script. The JSON Viewer plugin helps you view JSON structure, but doesn't export to CSV. For quick one-time conversions, use JsonTools or an online tool, then clean up the CSV in Notepad. For automation, use a Python script.

Notepad is a text editor, not a data conversion tool. It can open and edit both JSON and CSV files, but it doesn't have built-in conversion between formats. The JsonTools plugin, available in Plugins Admin, adds a JSON-to-CSV form with several conversion strategies. The separate JSON Viewer plugin shows JSON as a collapsible tree view and validates syntax, but it doesn't export to CSV format.

The practical workflow: For non-developers, use JsonTools inside Notepad or copy JSON into an online JSON-to-CSV converter, such as the JSON to Excel tool, which exports CSV. Then open the result in Notepad for cleanup. For developers, write a Python script using the json and csv modules to automate conversion.

Method 1: JsonTools Plugin in Notepad

The JsonTools plugin helps you view, validate, and convert JSON. The JsonTools documentation confirms that it includes a JSON-to-CSV form with four conversion strategies. It is also distributed through the official Notepad plugin list.

  1. Open Notepad and go to Plugins > Plugins Admin
  2. Search for "JSON Tools" and install it
  3. Restart Notepad++
  4. Open your JSON file
  5. Go to Plugins > JsonTools > Open JSON tree viewer
  6. Leave the default @ query to use the full document, then click Query to CSV
  7. Choose a strategy, delimiter, and line ending, click Generate CSV, then copy the output

The available strategies are Default, Full recursive, No recursion, and Stringify iterables. Default is a reasonable starting point for an array of similar objects. For nested objects or arrays, compare the output from the other strategies and verify the column layout before using the CSV.

JsonTools performs the conversion. JSON Viewer is still useful when you only need a collapsible tree, syntax validation, or copied values, but it doesn't provide the CSV export described here.

Method 2: Online Converter + Notepad Cleanup

This is the fastest method for non-developers:

  1. Copy your JSON data
  2. Go to an online JSON to CSV converter (like the JSON to Excel tool which exports CSV)
  3. Paste your JSON and convert
  4. Download the CSV result
  5. Open in Notepad for any cleanup needed

This workflow is fast and requires no coding. For sensitive data, use the local workflow in Method 1 or Method 3 instead.

Method 3: Python Script

For developers or repeated conversions, Python handles this automatically:

Python
import json
import csv

with open('data.json', 'r', encoding='utf-8') as f:
    data = json.load(f)

with open('output.csv', 'w', newline='', encoding='utf-8') as f:
    writer = csv.DictWriter(f, fieldnames=data[0].keys())
    writer.writeheader()
    writer.writerows(data)

Save as convert.py, change data.json to your filename, then run python convert.py. This basic version expects a non-empty top-level array of objects and uses the first object to define the columns.

For nested JSON, use pandas:

Python
import json
import pandas as pd

with open('data.json', 'r', encoding='utf-8') as f:
    data = json.load(f)

df = pd.json_normalize(data)
df.to_csv('output.csv', index=False, encoding='utf-8')

Install pandas first: pip install pandas

What to Do When Your JSON Is Nested

Nested JSON can't be directly converted to CSV without flattening first. CSV is a flat table format. Nested objects need to be flattened into columns.

Example nested JSON:

JSON
[
  {
    "name": "Alice",
    "address": {
      "city": "New York",
      "zip": "10001"
    }
  }
]

Solution 1: Use the JSON Flattener to flatten your JSON first. It converts address.city to address_city as a single column. Then convert the flattened JSON to CSV.

Solution 2: Use pandas.json_normalize() in Python (shown in Method 3 above). It handles nested structures automatically.

Common Data Issues and How to Fix Them

Real-world JSON files have messy data. Here's how to handle the most common problems you'll hit during conversion.

Missing Keys in Some Objects

Your JSON array has 100 objects, but object 47 is missing the email key. csv.DictWriter writes an empty cell for a missing key by default. The bigger problem is an extra key that isn't listed in fieldnames, which raises a ValueError.

Fix: Build the column list from every object before writing the CSV:

Python
fieldnames = list(dict.fromkeys(
    key for item in data for key in item
))

with open('output.csv', 'w', newline='', encoding='utf-8') as f:
    writer = csv.DictWriter(f, fieldnames=fieldnames)
    writer.writeheader()
    writer.writerows(data)

This preserves the first-seen key order while including columns that appear only in later objects.

Values Containing Commas

Your JSON has "location": "San Francisco, CA". When you convert to CSV, the comma breaks the column structure.

Fix: Python's csv module handles this automatically by wrapping values in quotes. If you're doing manual conversion in Notepad++, wrap any value containing a comma in double quotes:

Code
name,location
Alice,"San Francisco, CA"

Values Containing Quotes

Your JSON has "comment": "She said "hello"". The quotes inside the value break CSV parsing.

Fix: In CSV, escape quotes by doubling them:

Code
name,comment
Alice,"She said ""hello"""

Python's csv module does this automatically. For manual conversion, use find-and-replace to change " to "" inside values.

Large Numbers Treated as Scientific Notation

Your JSON has "id": 1234567890123. Excel opens the CSV and displays it as 1.23E+12.

Fix: This is an Excel import problem, not a conversion problem. In Excel, use Data > From Text/CSV and set the column type to Text instead of General before loading the data.

Date Strings Reformatted by Excel

Your JSON has "date": "2026-04-16". Excel opens the CSV and changes it to 4/16/2026 or another format based on your locale.

Fix: Use Data > From Text/CSV in Excel and set the date column to Text before loading it. This preserves the original date string.

Boolean Values

Your JSON has "active": true. CSV doesn't have a boolean type. Should this be true, True, 1, or yes?

Fix: Decide on a convention. Python's csv module writes True and False by default. If you need 1 and 0, convert in the script:

Python
writer.writerow({k: (1 if item.get(k) is True else 0 if item.get(k) is False else item.get(k, '')) for k in headers})

Null Values

Your JSON has "middle_name": null. How should this appear in CSV?

Fix: Python's csv module writes None as an empty field. If you are transforming rows yourself, you can also make that choice explicit:

Python
writer.writerow({k: (item.get(k) if item.get(k) is not None else '') for k in headers})

Unicode and Special Characters

Your JSON has "name": "José" or emoji. The CSV looks garbled when opened.

Fix: Save the CSV with UTF-8 encoding. In Notepad, go to Encoding > Encode in UTF-8. In Python, specify encoding:

Python
with open('output.csv', 'w', newline='', encoding='utf-8') as f:

If Excel still shows garbled characters, save as UTF-8 with BOM instead. The BOM (Byte Order Mark) tells Excel to use UTF-8 encoding.

Array Values Inside Objects

Your JSON has "tags": ["python", "data", "csv"]. CSV can't represent arrays directly.

Fix: Join array values into a single string with a delimiter:

Python
for item in data:
    for key, value in item.items():
        if isinstance(value, list):
            item[key] = '; '.join(str(v) for v in value)

This converts ["python", "data", "csv"] to python; data; csv in the CSV. Use semicolon instead of comma to avoid breaking CSV structure.

Inconsistent Key Order

Object 1 has keys in order name, age, city. Object 50 has city, name, age. The CSV columns are misaligned.

Fix: Python's csv.DictWriter handles this automatically by using the fieldnames you specify. It writes values in the correct column regardless of key order in the JSON. Always use DictWriter instead of writer for JSON to CSV conversion.

Very Large Files

The standard json.load() approach loads the full document into memory. Whether that becomes a problem depends on the file size and available memory.

Fix: Process the file line by line when it is JSONL format, with one JSON object per line:

Python
with open('data.jsonl', 'r') as infile, open('output.csv', 'w', newline='') as outfile:
    first_line = json.loads(infile.readline())
    writer = csv.DictWriter(outfile, fieldnames=first_line.keys())
    writer.writeheader()
    writer.writerow(first_line)
    for line in infile:
        writer.writerow(json.loads(line))

For a single large JSON array, use a streaming JSON parser such as ijson instead of loading the whole array at once. Install it with pip install ijson.

Frequently Asked Questions

Can Notepad directly export JSON to CSV?

No. Notepad doesn't have a built-in JSON to CSV export feature. The JsonTools plugin adds the conversion inside Notepad. The JSON Viewer plugin lets you view JSON as a tree and copy values, but it doesn't export to CSV format directly. You can also use an online converter or a Python script.

How do I convert nested JSON to CSV?

Nested JSON needs to be flattened first because CSV is a flat table format. Use the JSON Flattener tool at www.merge-json-files.com to flatten nested objects into single-level keys like address_city and address_zip. Then convert the flattened JSON to CSV. Or use Python with pandas.json_normalize() which handles nested structures automatically. Install pandas with pip install pandas first.

What's the fastest way to convert JSON to CSV without coding?

Use the JsonTools plugin inside Notepad, or use an online JSON to CSV converter. With an online tool, copy your JSON, paste it into the converter, download the CSV result, then open it in Notepad for cleanup. The JSON to Excel tool at www.merge-json-files.com exports CSV format. Don't use online converters for sensitive data like API keys or personal information.

Will the column order in the CSV match my JSON key order?

Usually yes, but it depends on the conversion method. Python's csv.DictWriter preserves key order from your JSON. Online converters typically preserve order. Manual conversion in Notepad gives you full control over column order. If order matters for your workflow, verify the first few rows after conversion to confirm columns are where you expect them.

How do I handle JSON arrays when converting to CSV?

If your JSON is an array of objects with consistent keys, it converts directly to CSV where each object becomes a row. If you have arrays inside your objects (nested arrays), you need to flatten them first or handle them separately. Arrays of primitive values (numbers, strings) can be joined into a single CSV cell with a delimiter like semicolon or pipe. Use the JSON Flattener for complex nested arrays.

  1. JSON to Excel Converter if you need direct Excel output instead of CSV
  2. How to Format JSON in Notepad for beautifying and organizing your JSON data
  3. Best JSON Editors for Windows if you want to explore more editor options

Read More

All Articles
Convert JSON to CSV in Notepad++: Easy Methods (2026)