WebFontOMatic API
Font Conversion API
The WebFontOMatic API helps you do font conversion in your software or site.
If you're looking to manually upload a font and convert it, you'll be wanting this
API Change Log
- 2018-09-17 - response now includes CORS headers in case you need to call it from client-side.
- 2019-06-12 - added woff,svg,ttf options to format parameter
- 2019-06-12 - added HTTP 400 Bad Request 'UNSUPPORTED FORMAT' response if an unsupported format is requested
- 2021-07-15 - Service migrated to new cloud provider for faster speed and improved uptime/reliabilty
- 2021-07-15 - HTTP API calls are officially deprecated, in favour of HTTPS. The HTTP endpoint remains available for the foreseeable future (for backward compatibility) but should not be used for new integrations.
API Details
The API operates over HTTP(S) and is a simple POST API.
POST URL
https://webfontomatic.com/convert
Parameters
file - the font to be converted (TTF, OTF, or SVG format)
format - (optional*) font format you need (otf, eot, woff, woff2, svg, ttf)
Response
The API will serve either a font file or a zip file depending on the format* parameter.
* If you pass the 'format' parameter then you'll be returned a single font file in the requested format. If you omit this parameter, you'll receive a zip file containing all converted formats and an HTML/CSS example file (the same as if you had uploaded the font for manual conversion through our conversion page).
Example API calls using cURL:
Complete font package in all formats with demo HTML/CSS files:
curl -F "file=@myfont.ttf" https://webfontomatic.com/convert >converted.zip
Convert to a Single Font in EOT format:
curl -F "file=@myfont.ttf" -F "format=eot" https://webfontomatic.com/convert >converted.eot
Convert to a Single Font in WOFF2 format:
curl -F "file=@myfont.ttf" -F "format=woff2" https://webfontomatic.com/convert >converted.woff2
Convert to a Single Font in OTF format:
curl -F "file=@myfont.ttf" -F "format=otf" https://webfontomatic.com/convert >converted.otf
Need help?: