Diysb Tools

TSV 到 JSON

将 TSV(制表符分隔值)数据转换为 JSON 格式。将表格数据转换为结构化的 JSON 对象。

CSV 工具

What is a TSV 到 JSON?

将 TSV(制表符分隔值)数据转换为 JSON 格式。将表格数据转换为结构化的 JSON 对象。

Input TSV
Output JSON
工具选项
Input CSV Format
Character used to quote TSV values
Symbol to mark comments in the TSV
Conversion Options
First row is treated as column headers
Convert numbers and booleans to their proper types
Output Formatting
Use Spaces for indentation
Number of spaces for indentation
Use Tabs for indentation
Minify JSON
TSV 到 JSON 示例

Basic TSV to JSON Array

Convert a simple TSV file into a JSON array structure by using spaces as formatting indentation.

Input
name	age	city
John	30	New York
Alice	25	London
Output
[
  {
    "name": "John",
    "age": 30,
    "city": "New York"
  },
  {
    "name": "Alice",
    "age": 25,
    "city": "London"
  }
]
Input CSV Format
Character used to quote TSV values
Symbol to mark comments in the TSV
Conversion Options
First row is treated as column headers
Convert numbers and booleans to their proper types
Output Formatting
Use Spaces for indentation
Number of spaces for indentation
Use Tabs for indentation
Minify JSON

Turn TSV to JSON without Headers

Convert a TSV file in minified JSON file.

Input
Square	Triangle	Circle
Cube	Cone	Sphere
#Oval
Output
[["Square","Triangle","Circle"],["Cube","Cone","Sphere"]]
Input CSV Format
Character used to quote TSV values
Symbol to mark comments in the TSV
Conversion Options
First row is treated as column headers
Convert numbers and booleans to their proper types
Output Formatting
Use Spaces for indentation
Use Tabs for indentation
Minify JSON

Transform TSV to JSON with Headers

Convert a TSV file with headers into a JSON file.

Input
item	material	quantity


Hat	Wool	3
Gloves	Leather	5
Candle	Wax	4
Vase	Glass	2

Sculpture	Bronze	1
Table	Wood	1

Bookshelf	Wood	2
Output
[
  {
    "item": "Hat",
    "material": "Wool",
    "quantity": 3
  },
  {
    "item": "Gloves",
    "material": "Leather",
    "quantity": 5
  },
  {
    "item": "Candle",
    "material": "Wax",
    "quantity": 4
  },
  {
    "item": "Vase",
    "material": "Glass",
    "quantity": 2
  },
  {
    "item": "Sculpture",
    "material": "Bronze",
    "quantity": 1
  },
  {
    "item": "Table",
    "material": "Wood",
    "quantity": 1
  },
  {
    "item": "Bookshelf",
    "material": "Wood",
    "quantity": 2
  }
]
Input CSV Format
Character used to quote TSV values
Symbol to mark comments in the TSV
Conversion Options
First row is treated as column headers
Convert numbers and booleans to their proper types
Output Formatting
Use Spaces for indentation
Number of spaces for indentation
Use Tabs for indentation
Minify JSON