# JSON to CSV converter > How do you turn JSON into CSV, or CSV into JSON? Convert JSON to CSV and CSV to JSON, with nested data flattened to columns, right in your browser. Convert JSON to CSV or CSV to JSON in your browser. Nested objects become dotted columns, quoting follows RFC 4180, and nothing is uploaded. A preset of [Format converter](https://how.box/format-converter/). - Page: https://how.box/json-csv/ - Runs entirely in the browser. - License: HowToolbox's own text and data (titles, explanations, FAQs, tool descriptions and schemas, this file) are CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); AI training and answers are welcome. Attribute "HowToolbox (how.box)" with a link to the page used. Third-party data keeps its own terms; the name and logo are not licensed. Publisher: HowToolbox, contact@how.box. Terms: https://how.box/about/terms/ ## Inputs Answer link: https://how.box/json-csv/?from={from}&to={to}&text={text}&flat={flat}&header={header}&delim={delim}&sep={sep}&types={types}&indent={indent} - `from` (json, csv, tsv or yaml): The source format: json, csv, tsv or yaml. Example: `json`. - `to` (json, csv, tsv or yaml): The written format: json, csv, tsv or yaml. Example: `csv`. - `text` (text): The text to convert. Example: `[{"a":1}]`. - `flat` (boolean): Flatten nested data to dotted columns, or rebuild it: 1 or 0. Example: `true`. - `header` (boolean): Reading CSV or TSV: the first row holds the names: 1 or 0. Example: `true`. - `delim` (auto, comma, semicolon, tab or pipe): Reading CSV: auto, comma, semicolon, tab or pipe. Example: `auto`. - `sep` (comma, semicolon or tab): Writing CSV: the separator, comma, semicolon or tab. Example: `semicolon`. - `types` (boolean): Reading CSV or TSV: write numbers and booleans as values: 1 or 0. Example: `true`. - `indent` (2 or 4): Writing JSON or YAML: 2 or 4 spaces. Example: `2`. Example answer: https://how.box/json-csv/?from=json&to=csv&text=%5B%7B%22a%22%3A1%7D%5D&flat=1&header=1&delim=auto&sep=semicolon&types=1&indent=2 The page computes the answer in the browser: read results from the agent tools below, not from the page HTML. ## Agent tools - `format_converter_convert`: Converts data text between JSON (RFC 8259), CSV (RFC 4180), TSV and YAML (a JSON-compatible subset of YAML 1.2: no anchors, aliases, tags or several documents) in the browser. - MCP, one POST to https://how.box/mcp: `{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"format_converter_convert","arguments":{"from":"json","to":"csv","text":"[{\"a\":1}]","flatten":true,"header":true,"delimiter":"auto","csv_delimiter":"semicolon","infer_types":true,"indent":"2"}}}` - GET: https://how.box/mcp/run/format_converter_convert?from=json&to=csv&text=%5B%7B%22a%22%3A1%7D%5D&flatten=true&header=true&delimiter=auto&csv_delimiter=semicolon&infer_types=true&indent=2 ## How it works CSV is a table written as text: one record per line, fields separated by commas. A field that contains a comma, a double quote or a line break is wrapped in double quotes, and a quote inside it is doubled (RFC 4180). JSON is a tree of objects and arrays, so turning it into a table takes a rule for the nesting. This tool uses the usual rule: each object in a list becomes a row, each key a column, and a nested value gets a column named by its path. An object with a name, a nested born.year and a list of tags has the columns name, born.year and tags.0. Keys missing from a row leave an empty cell. Going back, dotted headers rebuild the nesting, and a numeric step makes an array. CSV has no types, so reading it back is a guess. With type detection on, 42 becomes a number, true and false become booleans and an empty cell becomes null; a value such as 007 is not a JSON number and stays text, and so do integers too large to be exact. Files from European spreadsheets often use a semicolon, which the tool detects. It writes only RFC 4180 commas. ## FAQ **How is nested JSON turned into CSV?** Each nested value gets a column named by its path, such as address.city or tags.0. Switch the option off to write nested values as JSON text in one cell. **Can the JSON be a single object?** Yes. One object gives one row. A list of objects gives one row each. **Are leading zeros kept, as in a ZIP code?** Yes. A value such as 00501 is not a valid JSON number, so it stays text. Turn type detection off to keep every cell as text. **My CSV uses semicolons. Does that work?** Yes. The separator is detected from the first line, or you can choose it. **Is my data uploaded?** No. The conversion runs in your browser. More: [HowToolbox index](https://how.box/llms.txt) · [Agent Skill](https://how.box/skill.md) · [agent terms](https://how.box/about/agents/)