JSON to CSV Converter & JSON Formatter

Convert JSON, CSV, XML and TXT in any direction. Format and validate JSON, XML and SQL. Free, instant and private: nothing is uploaded.

JSON Formatter & Validator

Ready.

By ConvertsFiles Admin · Updated October 2026

Free JSON to CSV converter, JSON formatter and data converter

This tool converts JSON to CSV and CSV to JSON, and also converts XML and TXT in any direction. It formats and validates JSON, XML and SQL too. Everything runs in your browser, so your data is never sent to a server.

  • Converts: JSON, CSV, XML and TXT in any direction.
  • Formats and validates: JSON, XML and SQL.
  • Privacy: runs in your browser and uploads nothing.
  • Cost: free, with no sign-up and no watermark.
  • Limits: broken JSON is reported, not repaired, and very large files depend on your device memory.

How to format JSON online

  1. Paste your JSON on the left, drop a file on the input box, or use Upload file.
  2. Pick an indent size. Tick Sort keys A–Z if you want keys in alphabetical order.
  3. Click Format. If the JSON is valid you get a neat, indented result.
  4. If it is not valid, the status line shows the error and, in most browsers, the line and column.
  5. Copy the result or download it.

Beautify or minify?

Beautify adds line breaks and indentation so people can read the data. Minify removes all extra whitespace to make the file smaller for APIs and production use. Both keep the data exactly the same.

Convert JSON to CSV

Paste an array of objects and choose JSON ➔ CSV. With Flatten on, nested objects become columns named with dots, so address.city gets its own column. Arrays of plain values are joined with a semicolon.

[{"id":1,"name":"Ali","address":{"city":"Austin"}}]
→ id,name,address.city
  1,Ali,Austin

Convert CSV to JSON

Choose CSV ➔ JSON, paste your CSV or upload a file. The delimiter is detected automatically, so comma, semicolon, tab and pipe files all work. The first row becomes the keys. Numbers and true/false values are converted to real JSON types, while values with leading zeros such as ZIP codes stay text. Tick JSON Lines for one object per line.

Convert between JSON, CSV, XML and TXT

Choose Any ➔ Any, then pick From and To. This covers JSON to XML, XML to JSON, XML to CSV, CSV to XML, JSON to TXT and TXT to JSON. XML attributes are kept under an @attributes key in JSON and written back as attributes when you convert to XML. Repeated XML elements become arrays.

<users><user id="1"><name>Ali</name></user></users>
→ {"user":{"@attributes":{"id":"1"},"name":"Ali"}}

CSV and XML are different shapes of data. JSON and XML are trees, while CSV is a flat table, so deeply nested data is flattened into dotted column names. The root element of an XML file is not kept as a key, and converting back to XML wraps the data in a new <root> element. TXT input is read as JSON when it is valid JSON. If every line has the same number of commas, semicolons, tabs or pipes, it is read as a table. Anything else is wrapped as {"text_content": "..."}.

ConvertWhat you get
JSON ➔ CSVOne row per object. Nested keys become dotted columns such as address.city.
CSV ➔ JSONThe first row becomes the keys. Numbers and true/false become real types. JSON Lines is optional.
XML ➔ JSONAttributes go under @attributes. Repeated elements become arrays.
JSON ➔ XMLKeys become elements inside a root element. Arrays repeat the element.
XML ➔ CSVRepeated elements become rows. Attributes become columns.
CSV ➔ XMLEach row becomes an item element with one child per column.
TXT ➔ JSON or CSVTable-like text is read as rows. Other text is kept as text_content.
JSON ➔ TXTThe data as formatted JSON text.

XML, SQL and CSV tools

  • XML: pretty-prints, minifies and reports well-formedness errors.
  • SQL: uppercases keywords and puts clauses on separate lines for easier review.
  • CSV tidy: cleans stray spaces and converts between delimiters without breaking quoted fields.

Common JSON errors and how to fix them

  • Trailing comma after the last item. JSON does not allow it.
  • Single quotes around keys or strings. JSON requires double quotes.
  • Unquoted keys such as {name: "Ali"}. Keys must be quoted.
  • Comments (// or /* */). JSON has no comments.
  • Missing bracket or brace. Check the line and column shown in the error.

Good to know

  • The tool reports errors but does not auto-repair broken JSON.
  • Very large files depend on your browser memory. Output over 200,000 characters is shortened on screen, and Copy and Download still give the full result.
  • Sorting keys changes the order of keys, not their values.
  • CSV cells that start with = + - or @ can be read as formulas by spreadsheet apps. Check files from untrusted sources.
  • A dark mode is available with the button at the top right of the tool.

Frequently asked questions

How do I beautify JSON online?

Paste the JSON, choose an indent size and click Format. The result appears on the right, ready to copy or download.

How do I format a JSON file?

Click Upload file and select your .json file, or drop it on the input box. Click Format and download the formatted version.

Can I beautify JSON in Notepad++?

Yes, with a plugin such as JSON Viewer or JSTool. If you do not want to install anything, paste the JSON into this page instead.

How do I convert JSON to CSV?

Select JSON ➔ CSV, paste an array of objects and click Convert. Keep Flatten on if your objects contain nested data.

How do I convert CSV to JSON?

Select CSV ➔ JSON, paste the CSV or upload it and click Convert. You get an array of objects, or JSON Lines if you tick that option.

How do I convert XML to JSON or XML to CSV?

Select Any ➔ Any, set From to XML and To to JSON or CSV, then paste your XML. Repeated elements become rows or array items.

How do I convert JSON to XML?

Select Any ➔ Any, set From to JSON and To to XML. Object keys become element names, and arrays repeat the element.

How do I find the error in my JSON?

Click Format. An invalid document shows an error message, and in most browsers it includes the line and column of the problem.

Is my data uploaded to a server?

No. Formatting, validation and conversion all happen in your browser. Your data stays on your device.

Is this converter free?

Yes, it is free, with no sign-up and no limits on how often you use it.

What is the best JSON formatter?

There is no single best one. Look for a formatter that runs in your browser, shows the line and column of errors, and copes with large files. This tool does the first two, and large files depend on your device memory.

How do I convert TXT to CSV?

Select Any ➔ Any, set From to TXT and To to CSV. If every line has the same number of commas, semicolons, tabs or pipes, the text is read as a table and written as CSV.

Does the tool detect the delimiter automatically?

Yes. Auto-detect picks comma, semicolon, tab or pipe from the first line. You can also choose the input and output delimiter yourself.

What is JSON Lines?

JSON Lines puts one JSON object on each line, with no surrounding array. It is common for logs and big datasets. Tick JSON Lines in the CSV ➔ JSON options to create it.

How do I convert a large CSV to JSON?

Paste or drop the file and click Convert. Very large files depend on your browser memory, and output over 200,000 characters is shortened on screen while Copy and Download give the full result. For files of hundreds of megabytes, use a command-line tool.

More free tools

© 2026 ConvertsFiles.com. All processing happens in your browser.
Featured on LaunchBuff OpenHunts Club Member Proudly listed on Launchpadly Startup Directory
Scroll to Top
convertsfiles

convertsfiles

40+ free tools: PDF, image converter & calculators

Check it out on Product Hunt →