CODDY Tool

JSON Tool

Format, validate, minify and convert JSON to CSV, YAML and XML.

One workspace for everything JSON. Pretty-print a minified response, find exactly where a payload breaks, explore it as a collapsible tree, and convert between JSON, CSV, YAML and XML in either direction.

Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.

Loading tool…

What JSON Tool supports

Clean up

  • Format & beautify
  • Minify
  • Validate
  • Tree view
  • Sort keys

Convert

  • JSON → CSV
  • CSV → JSON
  • JSON → YAML
  • YAML → JSON
  • JSON → XML
  • XML → JSON

About JSON Tool

API responses arrive minified because whitespace costs bandwidth. That is right for a machine and useless for a human trying to work out why a field is missing. Formatting restores the indentation that makes structure visible, and the tree view goes further — collapse the branches you do not care about and the shape of a large document becomes obvious in seconds.

When parsing fails you get the line, the column, an excerpt with the offending character marked, and an explanation in terms of what you probably meant. "Trailing comma before }" is actionable; "Unexpected token" is not.

The conversions cover the formats data actually moves between. CSV for spreadsheets and imports, YAML for configuration, XML for older APIs and feeds. CSV parsing follows RFC 4180 properly, so quoted fields containing commas and newlines survive — the thing naive split-on-comma implementations get wrong, and the reason exported spreadsheets so often import badly.

How to use the JSON tool

  1. Paste your data

    JSON, CSV, YAML or XML — whichever you are starting from.

  2. Pick an operation

    Format, minify, validate, or convert to another format.

  3. Adjust the options

    Choose indentation, sort keys alphabetically, or set the CSV delimiter.

  4. Copy or download

    Take the result to your clipboard or save it with the right file extension.

Things that commonly break JSON

  • A trailing comma after the last item — valid in JavaScript, invalid in JSON.
  • Single quotes around strings or keys; JSON requires double quotes.
  • Unquoted object keys, which are legal in a JavaScript object literal but not in JSON.
  • Comments — the specification has no comment syntax, however often people want one.
  • Smart quotes substituted by a word processor, or a byte order mark from a copied file.
  • NaN, Infinity or undefined, none of which are valid JSON values.

Notes on the conversions

JSON to CSV needs an array at the top level, because each element becomes a row. Columns are the union of every row's keys in first-seen order, so a row with an extra field does not lose it. Nested objects are written as JSON inside the cell, since CSV has no way to express nesting.

CSV to JSON converts values that are unambiguously numbers or booleans, but leaves anything with a leading zero as text — postcodes and phone numbers stop being themselves the moment they become integers.

XML needs exactly one root element, so an array or a bare value is wrapped before it is serialised. Attributes are prefixed with @ when converting in either direction.

Frequently asked questions

Is my JSON sent to a server?

No. Parsing, formatting and every conversion happen in your browser. That matters, because the JSON developers most often need to format is an API response containing tokens, internal identifiers or customer data — none of which should be pasted into a server-side tool.

Why does my JSON fail to parse?

The usual causes are a trailing comma, single quotes instead of double quotes, unquoted keys, or comments. The error message gives the exact line and column with the offending character marked, which is normally enough to spot it immediately.

Can it convert nested JSON to CSV?

It converts the top level to rows and writes any nested object or array as JSON text inside the cell. CSV is a flat format with no way to express nesting, so that is the honest representation — flatten the data first if you need nested values in their own columns.

Does sorting keys change my data?

No. JSON objects are unordered by specification, so reordering keys produces an equivalent document. It is genuinely useful for diffing two responses that contain the same data in a different order.

Which YAML features are supported?

The JSON-compatible subset, which covers essentially all configuration files: maps, sequences, scalars, comments and multi-line strings. Anchors and custom tags are not resolved, since they have no JSON equivalent to convert into.

How large a document can it handle?

Several megabytes comfortably. Very large documents may make the tree view feel sluggish, because it renders nodes as you expand them, but formatting and conversion stay fast.

All Developer Tools

JSON Tool is free to use with no account, no watermark and no usage limits. Last updated 14 August 2026.