Split a CSV row into lines
Turn a horizontal CSV record into a clean vertical list without breaking values that contain commas.
Run — free
This parser understands standard quoted fields, doubled quote escapes, empty columns, and an optional final line ending. It is useful when a row copied from a spreadsheet, export, log, or command output needs to become a list for a document, form, script, or comparison. The same deterministic conversion runs in the browser and through the API, with no network lookup or format guessing.
Paste one complete CSV record
Provide exactly one comma-separated record in the text field. A simple input such as <code>red,green,blue</code> becomes three lines in the same order. Empty columns are not discarded: <code>red,,blue,</code> produces four values, including the empty second and final fields. That behavior matters when column positions carry meaning, because silently dropping blanks would shift every later value. You may include one final LF, CRLF, or CR record terminator, which is convenient when the row was copied from a file or terminal. Any additional record separator outside a quoted field is rejected because this capability is intentionally for one row, not an entire CSV document. It does not trim spaces or reinterpret numbers, dates, booleans, or null-like words. The characters in each field remain the characters supplied by the user after CSV quote syntax is decoded. This makes the conversion predictable for identifiers, labels, addresses, spreadsheet cells, and machine-generated values where automatic cleanup could corrupt meaningful content.
Quoted fields are parsed as CSV, not split blindly
A plain string split at every comma fails as soon as a field contains an address, product description, or sentence with punctuation. This capability uses a stateful CSV parser instead. When a field begins with a double quote, commas remain part of that value until the matching closing quote. Two consecutive double quotes inside a quoted field decode to one literal double quote, following common CSV escaping rules. Line breaks may also occur inside a quoted field and remain part of that value. After a closing quote, only a comma or the end of the record is valid; unexpected characters trigger a clear input error rather than producing a plausible but incorrect list. A quote encountered midway through an unquoted field is rejected for the same reason. These strict checks expose malformed exports early and avoid quietly changing their meaning. The parser makes one bounded pass through the input, uses no external service, and always produces the same result for the same text.
Use the vertical result wherever lines are easier
The response provides a newline-joined result for immediate copying, a lines array for structured use, and a field count for quick verification. The joined result is convenient for pasting values into a multiline form, text editor, allowlist, configuration file, issue description, or one-column spreadsheet range. The array is safer for application code because it preserves the boundary of every parsed CSV field, including empty fields and values that themselves contain a line break. Before automating a conversion, compare field_count with the number of columns expected by the receiving system; a mismatch often reveals a missing comma, an extra trailing column, or malformed quoting upstream. Use a full CSV parser when the input contains headers and multiple records, needs delimiter detection, or requires schema validation. This focused capability is best when the source is already known to be a single comma-separated record and the desired transformation is simply from horizontal fields to vertical values. API requests cost $0.002; the browser version performs the same deterministic parsing locally.
What you can do with it
Turn spreadsheet cells into a list
Paste one exported row and copy its columns as one value per line without damaging quoted commas.
Prepare multiline form input
Convert a CSV record of identifiers or labels into the line-oriented format accepted by many bulk forms.
Inspect a troublesome record
Expose each field separately to check empty columns, escaped quotes, and the actual number of values.
FAQ
Does it handle commas inside values?
Yes. Commas inside a properly quoted field remain part of that value instead of creating another line.
How are quote characters escaped?
Inside a quoted field, two consecutive double quotes decode to one literal double quote.
Are empty CSV fields preserved?
Yes. Leading, middle, and trailing empty fields are retained so column positions do not shift.
Can I submit a complete CSV file?
No. Submit exactly one record. Use a full CSV conversion capability for headers and multiple records.
Does it trim spaces or convert data types?
No. Unquoted spaces are preserved, and every parsed field remains text.
What does it cost?
The browser version runs locally for free. An API request costs $0.002.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/str/csv-row-to-lines \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"alpha,\"New York, NY\",\"She said \"\"hello\"\"\",omega"}'const res = await fetch("https://api.kit.forhosting.com/str/csv-row-to-lines", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "alpha,\"New York, NY\",\"She said \"\"hello\"\"\",omega"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/str/csv-row-to-lines",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "alpha,\"New York, NY\",\"She said \"\"hello\"\"\",omega"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/str/csv-row-to-lines", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"alpha,\\"New York, NY\\",\\"She said \\"\\"hello\\"\\"\\",omega"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"alpha,\"New York, NY\",\"She said \"\"hello\"\"\",omega"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/str/csv-row-to-lines", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "alpha,\"New York, NY\",\"She said \"\"hello\"\"\",omega"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "str.csv_row_to_lines",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_chars | 100000 |
max_fields | 10000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |