TTF to WOFF2
Convert TrueType fonts to WOFF2 web fonts.
Try TTF to WOFF2 in the browser →
Convert.FAST uses this same API — what you see in the browser is what you get in code.
Quick reference
| Job type | font.ttf-to-woff2 |
| targetFormat | woff2 |
| Category | fonts |
| Input formats | .ttf |
| Output extension | .woff2 |
| Costing | 1 credit per 5 MB |
| Max file size | 200 MB |
Example
# 1) Submit
JOB_ID=$(curl -sS -X POST "https://api.tools.fast/convert" \
-H "X-Fast-Api-Key: $API_KEY" \
-F "file=@font.ttf" \
-F "targetFormat=woff2" | jq -r '.id')
# → 202 Accepted: {"id": "019e3a7b-...", "status": "Queued"}
# 2) Poll until terminal status
while true; do
RESPONSE=$(curl -sS "https://api.tools.fast/convert/job/${JOB_ID}" \
-H "X-Fast-Api-Key: $API_KEY")
STATUS=$(echo "$RESPONSE" | jq -r '.status')
[ "${STATUS}" = "Succeeded" ] && break
[ "${STATUS}" = "Failed" ] || [ "${STATUS}" = "Canceled" ] && { echo "$RESPONSE" | jq; exit 1; }
sleep 1
done
# 3) Download
curl -sS "https://api.tools.fast/convert/job/${JOB_ID}/download" \
-H "X-Fast-Api-Key: $API_KEY" \
-o "font.woff2"
# → Binary file (font/woff2, 2.5 MB)Options
This converter does not support additional options.
Cost estimate
curl -sS "https://api.tools.fast/convert/estimate/ttf/woff2?fileSizeMb=50"