CSV Conversion
The /csv endpoint converts between CSV and JSON: parse turns CSV text into an array of objects, format does the reverse.
How it works?
The parser respects quoted fields, including escaped quotes ("") and newlines inside a quoted field. CRLF and CR line endings are normalized to LF before parsing.
curl -X POST \ "https://api.moxon.dev/v5/csv" \ -H "Content-Type: application/json" \ -d '{}'Send the request to see the response here.
The request body must be JSON:
action"parse" | "format"requiredAction to perform:
parseorformatcsvstringconditionalCSV text to convert (required for
parse)jsonjsonconditionalArray of objects to convert (required for
format)delimiterstringoptionalField separator, a single character. Default:
,headersbooleanoptionalparseonly: use the first row as object keys. Default:true
| Action | Description |
|---|---|
parse | Converts CSV text into an array of objects |
format | Converts an array of objects into CSV text |
parse action:
actionstringparserowsobject[]Array of parsed row objects
countnumberNumber of rows returned
format action:
actionstringformatcsvstringThe generated CSV text
countnumberNumber of rows converted
If parameters are missing or invalid, the API will return an error:
- 400
Please provide an action (?action=parse|format)Theactionparameter is missing - 400
Please provide a valid action (?action=parse|format)Theactionvalue is notparseorformat - 400
Delimiter must be a single characterThedelimiteris not exactly one character - 400
Please provide CSV data (?csv={data})Thecsvparameter is missing forparse - 400
CSV cannot exceed 50000 charactersThecsvtext exceeds the maximum length - 400
CSV cannot exceed 1000 rowsThe parsed data has more rows than the limit - 400
Please provide a JSON array (?json=[...])Thejsonparameter is missing, not an array, or empty forformat - 400
JSON cannot exceed 1000 rowsThejsonarray has more rows than the limit
Last updated on August 18, 2026