> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Parse from CSV

> Parses CSV data into JSON.

export const FormField = ({property, label, required = false, diType, uiPatterns, children}) => {
  const patterns = Array.isArray(uiPatterns) ? uiPatterns : uiPatterns ? [uiPatterns] : [];
  return <div style={{
    margin: '1.5rem 0'
  }}>
      <div style={{
    display: 'flex',
    alignItems: 'baseline',
    flexWrap: 'wrap',
    gap: '0.5rem',
    marginBottom: '0.25rem'
  }}>
        <strong>{label}</strong>
        <span style={{
    fontSize: '0.7rem',
    fontWeight: 600,
    textTransform: 'uppercase',
    letterSpacing: '0.04em',
    color: required ? '#6241f5' : '#6b7280'
  }}>
          {required ? 'Required' : 'Optional'}
        </span>
      </div>

      <div>{children}</div>

      {diType || patterns.length > 0 ? <p style={{
    fontSize: '0.85rem',
    color: '#6b7280',
    marginBottom: 0
  }}>
          {diType ? <>
              See the <a href={`/references/${diType}`}>{diType}</a> reference.{' '}
            </> : null}
          {patterns.length > 0 ? <>
              Accepts a <a href={`/documentation/placeholders-and-patterns/patterns#${patterns[0]}`}>pattern</a>.
            </> : null}
        </p> : null}
    </div>;
};

Parses CSV data into structured data. Use this when a value in your flow holds comma-separated text, such as an exported product list or a file dropped on an SFTP server, and you want to work with each row and column as data you can map and transform. By default the first row is read as column headers, and each following row becomes one item using those headers as field names.

This documentation describes: [Schema](/schemas/deserializer/csv)

## Fields

<FormField property="delimiter" label="Delimiter">
  The single character that separates one column from the next. Defaults to a comma (`,`). Change it to match your file, for example a semicolon (`;`) for many European exports or a tab character.
</FormField>

<FormField property="enclosure" label="Enclosure">
  The single character used to wrap a value that contains the delimiter or a line break, so it is read as one value rather than split. Defaults to a double quote (`"`).
</FormField>

<FormField property="escape" label="Escape">
  The single character that lets a special character appear literally inside a value. Defaults to a backslash (`\`). You rarely need to change this.
</FormField>

<FormField property="headers" label="Includes headers">
  An on/off toggle, on by default. When on, the first row is treated as column names and each following row becomes an item keyed by those names. Turn it off when the file has no header row; rows are then returned as numbered columns instead.
</FormField>

<FormField property="encodeInput" label="Input data is not UTF-8 encoded">
  An on/off toggle, off by default, which assumes the file is already UTF-8. Turn it on only when the file uses a different character set so that accented and other special characters come through correctly. When on, two extra options appear so you can describe the original character set.
</FormField>

<FormField property="encodingFrom" label="Convert from" required>
  Shown only when "Input data is not UTF-8 encoded" is on, and required there. The character set the file is actually saved in, so it can be converted to UTF-8 before parsing. Choose from UTF-16, ISO-8859-1, or Windows-1252.
</FormField>

<FormField property="modifier" label="On unconvertible characters">
  Shown only when conversion is on. Controls what happens to a character that has no UTF-8 equivalent: NONE stops with an error, IGNORE drops the character, and TRANSLIT replaces it with the closest similar character.
</FormField>

## Sample data

| Field            | Value |
| ---------------- | ----- |
| Delimiter        | `,`   |
| Includes headers | on    |

Input:

```
sku,name,price
A1,Wool scarf,19.95
B2,Leather belt,29.50
```

Output:

```json theme={null}
[
    { "sku": "A1", "name": "Wool scarf", "price": 19.95 },
    { "sku": "B2", "name": "Leather belt", "price": 29.5 }
]
```

Note that values that look like numbers come through as numbers, so `19.95` is a number rather than text.

```json Configuration theme={null}
{
  "prototype": "csv",
  "parameters": {
    "delimiter": ",",
    "headers": true
  }
}
```
