Converter Platform
Developer API

Converter API

Convert between 18 data formats with a single HTTP request — CSV, JSON, XML, YAML, SQL, Markdown, LaTeX, and more. That's 306 conversion pairs. Free tier includes 500 API calls per month.

Quick start

1
Create an account

Sign up free — no credit card required.

2
Generate an API key

Go to Settings → API Keys and create a key.

3
Make your first request

Send a POST to the sync endpoint with your data and options.

Example: CSV to JSON

Terminal
curl -X POST https://convertforanything.com/api/v1/convert/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_format": "csv",
    "output_format": "json",
    "content": "name,age\nAlice,30\nBob,25",
    "options": {
      "json_mode": "array",
      "pretty": true
    }
  }'

JavaScript (fetch)

JavaScript
const res = await fetch("https://convertforanything.com/api/v1/convert/sync", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    input_format: "csv",
    output_format: "json",
    content: "name,age\nAlice,30\nBob,25",
    options: { json_mode: "array", pretty: true },
  }),
});
const data = await res.json();
console.log(data.data.result);

Python (requests)

Python
import requests

res = requests.post(
    "https://convertforanything.com/api/v1/convert/sync",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "input_format": "csv",
        "output_format": "json",
        "content": "name,age\nAlice,30\nBob,25",
        "options": {"json_mode": "array", "pretty": True},
    },
)
print(res.json()["data"]["result"])

Response

JSON
{
  "ok": true,
  "data": {
    "result": "[{\"name\":\"Alice\",\"age\":\"30\"},{\"name\":\"Bob\",\"age\":\"25\"}]",
    "meta": { "rows": 2, "bytes_in": 28, "bytes_out": 56, "duration_ms": 3 }
  }
}

Example: CSV to SQL

Terminal
curl -X POST https://convertforanything.com/api/v1/convert/sync \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input_format": "csv",
    "output_format": "sql",
    "content": "name,age,active\nAlice,30,true\nBob,25,false",
    "options": {
      "table_name": "users",
      "dialect": "postgres",
      "include_create": true,
      "sql_drop_table": true
    }
  }'

Supported formats

CSVJSONXMLYAMLNDJSONTSVHTMLSQLTOMLFWFXLSXMarkdownDotenvINIPropertiesLaTeXRSSPLIST

Any format can be converted to any other format. That's 306 conversion pairs available via the API.

Format options

Pass these in the options object of your request body to customize output.

JSON

OptionTypeDescription
json_modestringOutput structure: array (default), object, column_arrays, array_of_arrays
json_key_columnstringColumn to use as key in object mode
prettybooleanPretty-print with 2-space indentation

CSV / TSV

OptionTypeDescription
delimiterstringField delimiter (default: comma for CSV, tab for TSV)
csv_bombooleanAdd UTF-8 BOM for Excel compatibility
csv_quote_allbooleanQuote all cell values
csv_headerbooleanInclude header row (default: true)
csv_line_endingstringLine ending: lf (default) or crlf

SQL

OptionTypeDescription
table_namestringSQL table name (default: data)
dialectstringSQL dialect: generic (default), mysql, postgres
include_createbooleanInclude CREATE TABLE with type inference
sql_drop_tablebooleanAdd DROP TABLE IF EXISTS before CREATE

YAML

OptionTypeDescription
yaml_indentnumberIndentation spaces per level (default: 2)
yaml_flowbooleanUse compact flow style for records

XML

OptionTypeDescription
xml_rootstringRoot element name (default: rows)
xml_rowstringRow element name (default: row)
xml_declarationbooleanInclude <?xml?> declaration
xml_cdatabooleanWrap special characters in CDATA
prettybooleanPretty-print with indentation

HTML

OptionTypeDescription
html_idstringHTML id attribute on <table>
html_stylestringTable style: plain (default), bordered, striped
html_captionstringTable caption text

FWF (Fixed-Width)

OptionTypeDescription
fwf_alignstringText alignment: left (default), right, center
fwf_fill_charstringPadding character (default: space)

TOML

OptionTypeDescription
toml_table_namestringTable name for array-of-tables output (default: item)

Markdown

OptionTypeDescription
markdown_alignmentstringColumn alignment: left (default), center, right
markdown_compactbooleanOmit padding spaces in cells

Dotenv

OptionTypeDescription
env_quote_stylestringQuoting: auto (default), always, never
env_sort_keysbooleanSort keys alphabetically

INI

OptionTypeDescription
ini_comment_charstringComment character: ; (default) or #
ini_delimiterstringKey-value delimiter: = (default), ' = ', or ': '

Properties

OptionTypeDescription
properties_separatorstringKey-value separator: = (default) or :
properties_unicode_escapebooleanEscape non-ASCII as \uXXXX sequences

LaTeX

OptionTypeDescription
latex_booktabsbooleanUse booktabs package rules (default: true)
latex_alignmentstringColumn alignment: l (default), c, r
latex_captionstringTable caption text

RSS

OptionTypeDescription
rss_channel_titlestringFeed channel title (default: Feed)
rss_channel_linkstringFeed channel link URL
rss_channel_descriptionstringFeed channel description

Endpoints

MethodEndpointDescription
POST/api/v1/convert/syncSynchronous conversion — send data, get result immediately
POST/api/v1/convert/previewPreview (no auth, 10-row cap) — great for testing
POST/api/v1/convert/jobsAsync job — queue a conversion and poll for results
GET/api/v1/convert/jobs/:idCheck job status and retrieve results

Free tier

API calls500 / month
Conversions500 / month
Max payload256 KB (sync)
File size10 MB

Need higher limits? View paid plans

Error codes

CodeHTTPMeaning
PARSE_FAILED400Input data could not be parsed in the specified format
UNSUPPORTED_FORMAT400Input or output format is not recognized
EMPTY_INPUT400No input content or file was provided
BODY_TOO_LARGE413Request body exceeds 1 MB (use async jobs for larger files)
AUTH_REQUIRED401Missing or invalid API key in Authorization header
RATE_LIMIT429Too many requests — wait and retry

Get API updates

Leave your email to hear about new endpoints, SDKs, and paid plan launches.