JSON, YAML and CSV Converter

Convert data between JSON, YAML and CSV in any direction.

Runs in your browser. Your input is not uploaded.

Convert from
Convert to

Paste data, open a file or drop one here. Pasted data is detected as JSON, YAML or CSV automatically.

CSV input
CSV output
Indentation

How to convert data

  1. Choose the format you have (From) and the format you want (To).
  2. Paste your data, or open or drop a file. Pasted data is recognised automatically.
  3. The result appears as you type. Copy it, or download it as a file.

The three formats

FormatGood forWatch out for
JSONAPIs, web apps, data exchangeNo comments; strict syntax
YAMLConfiguration files, CI pipelines, KubernetesIndentation matters; tabs are not allowed
CSVSpreadsheets, databases, data exportsFlat tables only; no types, everything is text

CSV options

  • Delimiter: comma is standard, but many European spreadsheet apps use semicolons because the comma is the decimal separator. Auto-detect picks the delimiter that gives the most consistent columns.
  • First row is column names turns each row into an object. Untick it to get a list of rows instead.
  • Detect numbers and true/false converts 42 to a number, true to a boolean and empty cells to null. Values such as 007 and very long numbers stay as text so no digits are lost.

Safe YAML handling

YAML is parsed with the yaml library using YAML 1.2 rules. It never runs code embedded in YAML, and it refuses “billion laughs” documents, in which a few lines of aliases expand into gigabytes of data and freeze your browser. A file containing several YAML documents separated by --- is converted to a list.

YAML 1.2 reads 01234 as the number 1234 and rounds integers longer than about 15 digits. The converter keeps such values as text instead, so ZIP codes, phone numbers and IDs keep every digit, and tells you when it has done so.

Limitations

  • YAML comments, anchors and custom tags are not kept when converting, because JSON and CSV have no equivalent.
  • CSV can only hold tables, so converting JSON to CSV needs a list of records, such as [{"name": "Ada"}].
  • Input is limited to 10 million characters.

Frequently asked questions

Why did “no” or “on” stay as text?

This converter follows YAML 1.2, the current version, where only true and false are booleans. Older YAML 1.1 tools turn yes, no, on and off into booleans, which famously turned the country code for Norway (NO) into false. If you need a boolean, write true or false. When writing YAML, the converter puts quotes around values like "no" and "on", so older tools read them as text too.

How are nested objects turned into CSV?

With Flatten nested objects ticked, nested properties become columns with dotted names, so {"address": {"city": "London"}} becomes a column called address.city. Arrays are written into a single cell as JSON. Untick it to write whole nested objects into single cells as JSON.

Is it safe to convert files with passwords or API keys?

Yes, as far as NiftyKit is concerned: everything happens in your browser, and nothing you paste or open is uploaded. Configuration files often contain secrets, which is exactly why this tool never sends your data anywhere.

Why do numbers in my CSV look different in Excel?

Spreadsheet apps reformat values when they open CSV files: they drop leading zeros, round long numbers and turn some text into dates. The CSV itself is correct. To keep values exactly as they are, import the file using the spreadsheet’s import wizard and set those columns to Text.