---
title: "TSV to CSV"
method: POST
path: "/api/v1/tools/tsv-to-csv"
tags: ["tools"]
---

# TSV to CSV

`POST /api/v1/tools/tsv-to-csv`

## Request

- Base URL: `https://toolforte.com`
- URL: `https://toolforte.com/api/v1/tools/tsv-to-csv`
- Auth: HTTP bearer

Convert tab separated text to CSV, or CSV back to TSV, quoting every field that needs it. A field holding the output delimiter, a double quote, a line break or outer whitespace is wrapped in quotes with inner quotes doubled, which is what stops a value such as Hex bolt, stainless from silently gaining a column. Semicolon output and a UTF-8 byte order mark are there for Excel in comma-decimal locales.

## Request body

- object
  - `text` string
  - `direction` string
  - `delimiter` string
  - `crlf` boolean
  - `byteOrderMark` boolean
  - `trailingNewline` boolean

## Response `200`

Successful result

- object
  - `ok` boolean
  - `data` object
    - `result` string
    - `rows` integer
    - `columns` integer
    - `quotedFields` integer
    - `raggedLines` unknown[]
      - unknown
    - `delimiter` string

## Other responses

- `400`: Missing or invalid request fields
- `401`: Invalid or missing API key
- `429`: Monthly plan limit reached

---

[API](https://skmtc.dev/toolforte/apis/toolforte-api.md) · [All operations](https://skmtc.dev/toolforte/apis/toolforte-api/llms.txt) · [OpenAPI document](https://skmtc.dev/toolforte/apis/toolforte-api/revisions/4d814d484dfc?raw)
