TSV to JSON

Convert a small tab-separated table to JSON while preserving identifiers and empty cells as strings.

Convert a small tab-separated table to JSON while preserving identifiers and empty cells as strings.

How to use

  1. Paste the sample with actual tabs and keep the tab after 002 to mark an empty final field.
  2. Run the conversion and inspect the two JSON objects under the id and note keys.
  3. Check the first note for its comma and the second note for an empty string.

Worked example

Input

id	note
001	"Hello, world"
002	

Expected result

[{"id":"001","note":"Hello, world"},{"id":"002","note":""}]

Check the result

Both identifiers should retain their leading zeroes: 001 and 002.

Continue with another guide

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

Learn how we use cookies