Check JSON and export a reliable CSV

Check JSON and export a reliable CSV

Format, validate and convert two records with commas, quotes and a missing value.

  1. Open JSON Formatter and paste the JSON below. Select Format to inspect the two objects. The second object lists its fields in a different order. This is valid JSON.

    [{"id":"001","name":"林, Mei","note":"She said \"Hi\""},{"note":null,"id":"002","name":"Omar"}]
  2. In JSON Validator, add a comma immediately before an object's closing brace and validate. The test should fail. Remove that comma and validate again.

  3. Paste the original into JSON to CSV. Compare its output with the expected CSV. There should be one header and two records. The field containing a comma remains a single cell, the literal quotes are doubled in CSV, and the second note is empty.

    id,name,note
    001,"林, Mei","She said ""Hi"""
    002,Omar,
  4. In a spreadsheet, import the ID column as text so 001 stays 001. This converter expects a flat array of objects with the same field names in every record.

Try this example

  • JSON Minify · Paste the sample and minify it. The long ID must stay exactly the same, and the two spaces inside the label must remain.

    {
      "id": 9007199254740993,
      "label": "two  spaces"
    }

    Expected result

    {"id":9007199254740993,"label":"two  spaces"}
  • Base64 Encode · Encode Café with its accented é and compare the result. The final equals sign is padding.

    Café

    Expected result

    Q2Fmw6k=
  • Base64 Decode · Decode the sample and check the accented é. Try Q2Fmw6k! to confirm invalid input is rejected.

    Q2Fmw6k=

    Expected result

    Café
  • UUID Generator · Generate twice. Both values should have the same 8–4–4–4–12 layout but different characters. The third group starts with 4; the fourth starts with 8, 9, a or b.

    Expected result

    c62cd143-d1a8-4712-9cb0-b7e6b36a1120

Try this example

Try this example

Try this example

  • CSV to JSON · Load the sample. The quoted line break stays in the first note, and the final row is kept even without a line ending.

    id,note
    001,"line 1
    line 2"
    002,"Hello, world"

    Expected result

    [{"id":"001","note":"line 1\nline 2"},{"id":"002","note":"Hello, world"}]
  • TSV to JSON · Load the sample and check that the comma remains part of the note and the second note is an empty string.

    id	note
    001	"Hello, world"
    002	

    Expected result

    [{"id":"001","note":"Hello, world"},{"id":"002","note":""}]
  • JSON to TSV
  • JSON to Text

Try this example

  • JSON Viewer
  • JSON Editor
  • XML to JSON · Load the sample and convert it. The repeated item elements become an array, and the accented character stays intact.

    <items><item>Tea</item><item>Café</item></items>

    Expected result

    {"item":["Tea","Café"]}
  • JSON to XML

Avatar

DTool Team

Product Team

We build simple, reliable browser tools that make everyday digital work faster.

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies