---
name: omniconvert
description: Convert, decode or inspect files in 246 format pairs with the OmniConvert API - geo (Shapefile, KML, KMZ, GeoJSON, GPX, NMEA, IGC), developer and web (HAR, Postman, OpenAPI, sitemap.xml, robots.txt, JSON/YAML/XML/TOML), certificates (X.509, CSR, CRL, P7B, JWK), citations (RIS, BibTeX, EndNote, CSL-JSON), spreadsheets, documents, PDF, images, subtitles, email (MBOX, EML) and genealogy (GEDCOM). Use when the user wants a file converted between these formats and no local tool is installed.
---

# OmniConvert

OmniConvert converts files with one HTTP request. Files are processed in memory and never stored.

## Setup

Every API conversion uses one credit from a credit token; failed conversions are refunded.
The token must be in the environment variable `OMNICONVERT_TOKEN`. If it is missing, tell the user to buy credits at https://www.omniconvert.cloud/agents and set it. Never print the token.

## 1. Find the conversion ID

```bash
curl -s https://www.omniconvert.cloud/api/conversions | jq -r '.conversions[] | "\(.id)\t\(.from) -> \(.to)\t\(.inputExtensions | join(","))"' | grep -i shapefile
```

IDs follow the pattern `<from>-to-<to>`. Examples by category:

- Archive: gzip-compress, gzip-decompress, zip-to-tar, tar-to-zip, brotli-compress, brotli-decompress
- Calendar: ics-to-csv, ics-to-json, json-to-ics, csv-to-ics
- Citation: bibtex-to-json, bibtex-to-csv, ris-to-json, ris-to-csv, ris-to-bibtex, endnote-to-json
- Config: env-to-json, json-to-env, ini-to-json, json-to-ini, ndjson-to-csv, plist-to-json
- Contact: vcf-to-csv, vcf-to-json, json-to-vcf, csv-to-vcf
- CSS: scss-to-css, less-to-css
- Data: csv-to-json, json-to-csv, yaml-to-json, json-to-yaml, xml-to-json, json-to-xml
- Developer: url-encode, url-decode, json-to-typescript, cron-to-human, har-to-curl, openapi-to-markdown
- Document: html-to-markdown, markdown-to-html, docx-to-html, docx-to-txt, docx-to-markdown, markdown-to-docx
- E-commerce: shopify-to-woo, woo-to-shopify, etsy-to-woo, woo-to-etsy, amazon-to-woo, bigcommerce-to-shopify
- Encoding: utf8-to-utf16le, utf16le-to-utf8, utf8-to-utf16be, utf16be-to-utf8, utf8-to-utf32le, utf32le-to-utf8
- Finance: ofx-to-csv, qif-to-csv, ofx-to-json, qif-to-json, csv-to-qif, mt940-to-csv
- Font: ttf-to-woff, woff-to-ttf, ttf-to-otf, otf-to-ttf, ttf-to-woff2, otf-to-woff
- Geo: kml-to-geojson, gpx-to-geojson, geojson-to-gpx, geojson-to-kml, geojson-to-csv, shapefile-to-geojson
- Image: image-to-ico, image-to-avif, svg-to-png, image-to-webp, image-to-jpg, image-to-png
- Network: har-to-csv, har-to-json, har-to-xlsx, hosts-to-json, json-to-hosts, dns-zone-to-json
- Notebook: ipynb-to-markdown, ipynb-to-html
- PDF: image-to-pdf, split-pdf, merge-pdf, compress-pdf, pdf-to-images, pdf-to-word
- QR Code: text-to-qr
- Security: pem-to-der, der-to-pem, cer-to-pem, crt-to-pem, jwt-to-json, x509-to-json
- Spreadsheet: csv-to-excel, excel-to-csv, json-to-xlsx, ods-to-csv, xlsx-to-ods, spreadsheet-to-html
- Subtitle: srt-to-vtt, vtt-to-srt, srt-to-json, srt-to-csv, vtt-to-json, vtt-to-csv

## 2. Convert

Upload a file (any format, up to 50 MB):

```bash
curl --fail-with-body -s \
  -H "Authorization: Bearer $OMNICONVERT_TOKEN" \
  -F "file=@input.zip" \
  -F "conversionId=shapefile-to-kml" \
  https://www.omniconvert.cloud/api/convert -o output.kml
```

Or send text and get JSON back, which is easier to read:

```bash
curl --fail-with-body -s \
  -H "Authorization: Bearer $OMNICONVERT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"conversionId": "csv-to-json", "text": "name,age\nAda,36"}' \
  https://www.omniconvert.cloud/api/convert
```

The JSON response is `{ filename, mimeType, size, encoding, content, creditsRemaining }`. When `encoding` is `"utf8"`, `content` is the converted text; when it is `"base64"`, decode it to get the file. Binary input goes in a `"base64"` field instead of `"text"`.

Multi-file inputs (a shapefile's .shp/.dbf/.prj, PDFs to merge, two JSON files to diff) are sent as one ZIP.

## Errors

Errors are JSON: `{ "error": CODE, "message": ... }`.

| Code | Meaning | What to do |
|---|---|---|
| TOKEN_REQUIRED / INVALID_TOKEN | No or wrong token | Ask the user to check OMNICONVERT_TOKEN |
| NO_CREDITS | Token is empty | Tell the user to buy credits at https://www.omniconvert.cloud/agents |
| UNKNOWN_CONVERSION | Wrong ID | Look it up in /api/conversions |
| CONVERSION_FAILED | Input couldn't be converted; credit refunded | Show the message; check the input format |
| FILE_TOO_LARGE | Over 50 MB | Split the input |

## Rules

- Never upload private keys, passwords, API keys or other secrets. Key conversions accept public keys only.
- Tell the user which conversion you ran and how many credits are left (`creditsRemaining`).
- An MCP server is also available at https://www.omniconvert.cloud/api/mcp (tools: list_conversions, convert_file, check_credits).
