Convert CSV to KML like a PRO

CSV to KML is a quick, painless conversion to prepare and convert geographical CSV data to KML format

Displaying geographical data in the browser is possible via KML (Keyhole Markup Language) format. Originally designed to display data for Google Earth, KML is the standard for geographical data.

  • 15+ Custom Built in parameters to make conversions easy
  • Include fields, exclude fields, override headers, and more!
  • API Design allows you to pass a local file, simple CSV string, or Web URL
  • Extendable to external APIs by passing credentials or OATH
  • Full Documentation and example usage

You must have an API token to call our APIs. You are automatically assigned one upon registering and confirming your email. See our tutorial: Two Methods of API Authentication and Example Use below that demonstrate passing your token to our server. You must substitute your token found in the Account page in place of [YOUR TOKEN]. Also, use your data file name instead of [YOUR FILE], i.e. invoices.csv. All conversion APIs require the infile parameter since it is the data you are converting.
Note that to read from an S3 bucket that requires authorization, you must pass both username and password parameters, and the URL must start with s3://.
There is a 25MB limit on input. You may however zip your input file and use it for infile.

Try it Now

Resulting curl command:

Parameter Value Type Description Example Use
infile


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]"
numeric Field position corresponding to altitude. This is optional for KML generation. curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?alt=6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
integer Increase maximum field size of CSV input, pass -1 for the maximum curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?csvfieldsize=99999" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?delimiter=%5E" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?encoding=ascii" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?exnulls=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?headover=pk,fullname,amount,comment" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
numeric Latitude column number curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?lat=4" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?limit=10" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
numeric Longitude column number curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?lng=6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Output lower case for these fields curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?lower=6" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Column number corresponding to NAME in KML curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?name=5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Input CSV file has no column headings curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?noheader=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Password for URL data source curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?password=bob&username=bee" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?skiplines=2" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean Supress line break in data curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?suppress=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
boolean TAB is the CSV file delimiter curl -X POST "https://www.convertcsv.io/api/v1/csv2kml?tab=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?trim=4,5" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
string Output upper case for these fields curl -X POST "https://www.convertcsv.io/api/v1/csv2kml=4,5" -F "infile=@[YOUR FILE]" -F "upper=1-4" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?username=johnny&password=xyz" -F "infile=https://www.xyz.com/myinputfile.csv" -H "Authorization: Token [YOUR TOKEN]"
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/csv2kml?xin=1" -F "infile=@[YOUR FILE]" -H "Authorization: Token [YOUR TOKEN]"
<

Pricing

Our Pricing

Free Test Drive

  • Try now and Buy Later - Product plans start at $39/month
  • Test drive ALL our API with no hassle(s)
  • Credit Card is not Required
  • Limited # of Total API calls
Custom

Unique

  • Need something more custom?
  • We can put together custom packages
  • Don't hesitate to contact us
  • We are ready to help!