infile
Local File
or URL
Or Data
string
This is the input file: raw data, or URL. Choose one of the options of "Local File", "URL", or "Data"
curl -X POST "https://www.convertcsv.io/api/v1/csv2json/" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
csvfieldsize
integer
Increase maximum field size of CSV input, pass -1 for the maximum
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?csvfieldsize=99999" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
delimiter
string
Input file delimiter, default is automatic detection. You usually will not need to use this.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?delimiter=%5E" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
encoding
string
File encoding - if not passed, the converter will attempt to determine the encoding by looking at the first few thousand bytes of the file. Typical values are: utf-8, utf-16.
You can see a list of all supported types here: https://docs.python.org/3/library/codecs.html
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?encoding=ascii" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
exclude
string
Exclude these fields in conversion. Use this if you want to convert all fields except these.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?exclude=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
exnulls
string
Do not output NULL for NULL in these fields. Many CSV files have NULL for NULL fields in a database table. The default is to convert those to NULL in SQL for instance, or null in JSON, however, NULL can be a legitimate value. Use this option to exclude fields from the default conversion.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?exnulls=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
fields
string
Include these fields in conversion. You specify fields by their position, starting at 1. If you wanted the first 5 fields, you can type 1,2,3,4,5 or 1-5. The default is to include all fields.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?fields=1,2,3" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
forcenum
string
Fields to force as numeric, i.e. 2
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?forcenum=2" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
forcequote
string
Force quotes around the specified fields. For instance, when converting to CSV, you may always want a certain field wrapped in double quotes.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?forcequote=3,4" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
forcetext
string
Fields to force as text when opening with Excel - i.e. 4,5. Use this option to inform Excel that you want certain field(s) to be treated as text instead of numeric. You should only use this if you plan on opening the CSV using Excel.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?forcetext=4,5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
headover
string
List of header columns - Use this to override the headers on the CSV file. If the input has no headers (as specified by parameter noheader), then this parameter is a way to specify the headers.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?headover=pk,fullname,amount,comment" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
keyvalue
boolean
For each line, output header followed by delimiter, followed by a value.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?keyvalue=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
limit
integer
Limit number of output records to N, i.e. 100. If you have a large output file, use this option to limit your output.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?limit=10" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
lower
string
Output lower case for these fields
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?lower=6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
noheader
boolean
Input CSV file has no column headings
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?noheader=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
nooutheader
boolean
Do not output header
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?nooutheader=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
nulls
string
Convert 'NULL' to a NULL SQL value or null JSON value. Many popular tools export the string NULL in place of NULL values in tables. By default, the converter will convert ALL NULL values to a NULL SQL value or null JSON value. If you use this option, only the fields specified will be converted. See also exnulls.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?nulls=1,5,6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
outdelimiter
string
Output file delimiter, i.e. : See also: outtab, outpipe, outsemi
Depending on our operating system and delimiter, you may have to quote the delimiter in the OS shell, or URL encode the delimiter if used in a query string.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv" -F "infile=@[YOUR FILE]" -F outdelimiter=":" -H "Authorization: Token [YOUR TOKEN]"
outpipe
boolean
Output delimiter is |. This is a convenience method sense | has special meaning in some command line shells. In the API query string, it is easier to use than encoding the query string. See also: outdelimiter, outtab, outsemi
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?outpipe=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
outsemi
boolean
Output delimiter is semi-colon. This is a convenience method sense semi-colon has special meaning in some command line shells. In the API query string, it is easier to use than encoding the query string. See also: outdelimiter, outtab, outpipe
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?outsemi=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
outtab
boolean
Output delimiter is Tab. This is a convenience method sense Tab is difficult to specify. See also: outdelimiter, outsemi, outpipe
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?outtab=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
out_encoding
string
Output file encoding
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?out_encoding=" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
password
string
Password for URL data source
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?password=bob&username=bee" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
quotinginput
string
Input quoting in CSV input, N=None, M=Minimal, A=ALL. You only need this reading delimited data with no special meaning to double quotes, in which case use N for None.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?quotinginput=N" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
quotingstyle
string
Output quoting in CSV output, N=None, M=Minimal, A=ALL. A will wrap all fields in double quotes. M will only wrap if necessary. N will not wrap with double quotes but will backslash special characters.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?quotingstyle=A" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
sheetname
string
Name of worksheet if outputting XLSX, default Sheet1
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?sheetname=Data" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
skiplines
integer
Skip/Ignore N record at top of input file. You may have a CSV file with empty lines or extra verbiage at the top. Use this option to skip those lines.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?skiplines=2" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
suppress
boolean
Supress line break in data
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?suppress=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
tab
boolean
TAB is the CSV file delimiter
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?tab=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
trim
string
Trim leading and trailing spaces for these fields. Use column positions to identify the fields. For instance if you always want fields 4 and 5 without leading and trailing spaces, then use this option.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?trim=4,5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
upper
string
Output upper case for these fields
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv=4,5" -F "infile=@[YOUR FILE]" -F "upper=1-4" -H "Authorization: Token [YOUR TOKEN]"
username
string
Username for URL data source. This is only used when URLs are the data source. See password also.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?username=johnny&password=xyz" -F "infile=https://www.xyz.com/myinputfile.csv" -H "Authorization: Token [YOUR TOKEN]"
xcols
integer
Skip N columns on the left side of the Excel sheet before beginning output
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xcols=2" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xfilter
boolean
Enable auto-filter in Excel
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xfilter=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xfooter
string
Generate footing in Excel
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xfooter=Copyright+2021" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xheader
string
Generate heading in Excel. The heading is only visible in Print mode.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xheader=Welcome" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xin
boolean
Input file is an Excel file with either .xlsx or .xls extension. If your column headers do not start on line 1, then use the "skiplines" option to skip to the header or data.
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xin=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xlsx
boolean
Generate Excel
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xlsx=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
xtop
integer
Skip N rows at the top of the Excel sheet before beginning output
curl -X POST "https://www.convertcsv.io/api/v1/csv2csv?xtop=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"