← Blog

Convert JSON to YAML, CSV & TSV Online

JSON formatter blog · Open JSON Formatter

JSON converter showing YAML CSV and TSV output options in the browser
Convert JSON to YAML, CSV & TSV Online

Need to convert JSON to YAML, CSV, or TSV without installing a desktop app? JSON Formatter & Converter includes Convert mode for common data-shape conversions: JSON to YAML, JSON to CSV, JSON to TSV, and CSV input back to JSON. It is free, no signup is required, and normal conversion work runs in your browser.

What Convert Mode Supports

Convert mode is designed for practical, everyday transformations. You can paste JSON and choose an output such as YAML, CSV, TSV, XML, TypeScript, C#, Java, or Python-style output. For this article, the focus is data exchange formats: YAML for readable configuration, CSV for spreadsheet-style rows, and TSV for tab-separated data.

The same workspace can also accept CSV input and convert it to JSON. That is helpful when someone sends a spreadsheet export and you need a JSON array for an API example, test fixture, or documentation sample. Converters are best-effort helpers for common structures. Always review the output before relying on it, especially when the source data is nested, irregular, or has mixed types.

Pick the output format based on the job. YAML is useful when humans need to read or edit configuration-like data. CSV is useful when the data is naturally rows and columns. TSV is useful when tab-separated output is expected or when comma-heavy values make CSV harder to scan. XML is useful for systems that require tagged document-style data.

How To Convert JSON To YAML Online

  1. Open JSON Formatter & Converter.
  2. Paste valid JSON into the editor, or import a local file.
  3. Use Format or validate JSON online first if the document might be invalid.
  4. Switch to Convert mode and choose YAML as the output.
  5. Review the YAML, then copy or download the result.

YAML is easier for some people to scan because it removes many braces and quotes, but it has its own syntax rules. Treat conversion as a starting point, then review indentation and scalar values before using the output in a config file.

YAML is whitespace-sensitive, so indentation carries meaning. After conversion, check nested arrays and objects carefully. A value that looked obvious in JSON may need quotes in YAML if it resembles a boolean, number, date, or special token. If the YAML will be used by another product, validate it with that product before treating it as final.

JSON To YAML Example

JSON input:

json
{
  "service": "billing",
  "enabled": true,
  "retries": 3,
  "owners": ["ops", "finance"]
}
{
  "service": "billing",
  "enabled": true,
  "retries": 3,
  "owners": ["ops", "finance"]
}

YAML output:

yaml
service: billing
enabled: true
retries: 3
owners:
  - ops
  - finance
service: billing
enabled: true
retries: 3
owners:
  - ops
  - finance

For simple objects, YAML output is usually straightforward. Nested objects and arrays can also be represented, but review the result if the YAML will be consumed by a strict tool.

How To Convert JSON To CSV Or TSV

CSV and TSV are row formats. They work best when your JSON is an array of similar objects, where each object represents one row and each key becomes a column. For example, a list of users, products, events, or orders is usually a good fit. A deeply nested API response with arrays inside arrays is less direct.

  1. Paste a JSON array of records.
  2. Choose CSV or TSV in Convert mode.
  3. Review generated headers and row values.
  4. Copy the output into a spreadsheet or download it for later use.
json
[
  { "id": 1, "name": "Ada", "plan": "pro" },
  { "id": 2, "name": "Lin", "plan": "free" }
]
[
  { "id": 1, "name": "Ada", "plan": "pro" },
  { "id": 2, "name": "Lin", "plan": "free" }
]

CSV output:

csv
id,name,plan
1,Ada,pro
2,Lin,free
id,name,plan
1,Ada,pro
2,Lin,free

TSV uses tabs instead of commas, which can be useful when values contain commas or when a downstream tool expects tab-separated records.

Before exporting to CSV or TSV, decide which fields should become columns. A clean array of similar objects usually converts well. A response object that contains metadata plus a nested results array may need trimming so only the records are converted. If you export the whole response, metadata fields can become repeated values or confusing columns.

Nested JSON To CSV Limits

Nested JSON is more expressive than CSV. JSON can hold objects inside arrays, arrays inside objects, mixed value types, nulls, and uneven shapes. CSV is a flat table. That means any JSON to CSV converter has to choose how to represent nested values. Some fields may be flattened, serialized, skipped, or simplified depending on the shape.

For predictable results, start with an array of objects that share the same keys. If you need path-style columns such as user.address.city or items[0].sku, use flatten JSON online first, then convert the flattened records. If nested arrays represent multiple rows, you may need to reshape the data manually before export.

Troubleshooting conversion output

If YAML output looks wrong, validate the JSON first and then inspect the nesting. Missing braces or invalid quotes can create parse errors before conversion even begins. If the YAML parses but the receiving tool rejects it, check indentation, quoted strings, and values that should stay strings instead of being interpreted as booleans or numbers.

If CSV output has unexpected columns, the input objects probably do not share the same shape. One row may contain email while another contains phone, or a nested object may have been serialized into one cell. Flatten a representative sample first when nested paths should become columns, and remove fields you do not want in the table before exporting.

If CSV to JSON produces strings for values that look like numbers or booleans, review the result before using it. CSV has no native JSON types, so many conversions preserve cell values as text. Change the values after conversion when your destination expects real numbers, booleans, arrays, or nulls.

CSV To JSON Input

Convert mode also supports CSV input to JSON. Paste a header row and values, then convert to a JSON array. This is handy for turning a spreadsheet export into sample API data or a test fixture.

csv
id,name,active
1,Ada,true
2,Lin,false
id,name,active
1,Ada,true
2,Lin,false

JSON output:

json
[
  {
    "id": "1",
    "name": "Ada",
    "active": "true"
  },
  {
    "id": "2",
    "name": "Lin",
    "active": "false"
  }
]
[
  {
    "id": "1",
    "name": "Ada",
    "active": "true"
  },
  {
    "id": "2",
    "name": "Lin",
    "active": "false"
  }
]

Review inferred values after conversion. CSV itself is text, so numbers and booleans may need adjustment depending on how you plan to use the JSON.

Honest limits for YAML, CSV, and TSV conversion

JSON, YAML, CSV, and TSV do not model data in exactly the same way. JSON and YAML can represent nested structures. CSV and TSV are flat tables. CSV has escaping rules for commas, quotes, and line breaks, while TSV uses tabs as separators. Because these formats differ, conversion is best used as a draft that you review, not as proof that every downstream requirement has been met.

Import URL And Privacy

Pasted JSON, YAML, CSV, and TSV conversion runs in your browser. No signup is required. If you use Import URL, your browser fetches the remote content directly and the remote host must allow CORS. Tools Viewer does not proxy the remote request. If the data is private, paste from a local file or local clipboard and keep the exported result under your control.

Import URL is useful for public samples, but it depends on the remote host allowing browser access. If a URL fails, download the source file yourself or paste the content directly. For private spreadsheets, payloads, and configuration samples, local paste or local file import is the simplest way to keep the workflow on your device.

Related Conversion Workflows

The converter is part of the larger JSON Formatter workspace. You can minify JSON online after conversion, compare JSON online before exporting, convert JSON to XML, convert Python dict to JSON, or convert JSONL to JSON before turning line-based records into CSV.

FAQ

Can I convert JSON to YAML online?

Yes. Paste valid JSON, choose YAML in Convert mode, then copy or download the output.

Can I convert JSON to CSV or TSV?

Yes. JSON to CSV and JSON to TSV work best for arrays of similar objects where each object is a row.

Can I convert CSV to JSON?

Yes. Paste CSV with a header row and convert it into a JSON array, then review the generated values.

Should I use CSV or TSV?

Use CSV for common spreadsheet workflows. Use TSV when a downstream tool expects tabs or when comma-heavy values make tab-separated output easier to handle.

Does nested JSON always convert cleanly to CSV?

No. CSV is flat, so nested JSON may need flattening or manual cleanup before the result is useful.

Are converters exact for every edge case?

No. They are best-effort helpers for common structures. Review converted output before using it.

Does conversion upload my data?

No. Pasted conversion runs in your browser. Import URL fetches from your browser and requires CORS from the remote host.

Start with JSON Formatter & Converter or read the JSON Formatter guide. Related: JSON formatter online, JSON size calculator, JSON stringify online, and JSON tree viewer online.