FOR THE DEVELOPERS WHO LOVE TYPE, TOO
Font conversion API.
Welcome to the Font Converter API
A powerful RESTful API for converting font files between various formats including TTF, OTF, WOFF, WOFF2, EOT, and SVG. Check the format capabilities for supported combinations. UFO directory uploads are not currently supported.
Quick Start
Get up and running with the API in minutes
OpenAPI 3.0
Full OpenAPI specification available
Real-time Updates
Server-Sent Events for live progress
Quick Start
1. Check Service Status
Check availability and the current upload limits:
curl https://onlinefontconverter.com/api/status
2. Submit a Conversion Job
Upload font files and specify target formats:
curl -X POST https://onlinefontconverter.com/api/convert \
-F "files=@myfont.ttf" \
-F "targetFormats=WOFF,WOFF2" \
-F "output=zip"
3. Check Job Status
Monitor the conversion progress using the job ID:
curl https://onlinefontconverter.com/api/jobs/{jobId}
4. Download Results
Once complete, download the converted fonts:
curl -f -o converted.zip
https://onlinefontconverter.com/api/jobs/{jobId}/download
Download fonts as they finish
You can download each successful conversion while the rest of the batch is still running.
Poll the conversions endpoint and use each item's downloadUrl when it becomes available.
Each result also includes its filename, size and SHA-256 checksum.
GET /api/jobs/{jobId}/conversionsWhen changing a batch, upload the complete current selection and include
reuseJobIds: a comma-separated list of up to 64 previous job IDs,
newest first. Matching successful conversions are reused; only missing combinations are converted.
The server checks file contents, source format and target format. Expired or missing results are converted again.
The response status includes reusedConversions, and each conversion includes reused.
Treat job IDs as private download credentials.
For the complete batch, keep using the job's ZIP or TAR download when its status is
COMPLETE. Files stay available for one hour after completion.
Keep job URLs private: anyone with a job link can access its files. The website's Start over button clears your local workspace; existing API jobs and download links expire as usual.
Key Features
Multi-Format Support
- Input: TTF, OTF, WOFF, WOFF2, EOT, SVG & more
- Output: TTF, OTF, WOFF, WOFF2, EOT, SVG
- Intelligent format detection
Batch Processing
- Convert multiple files at once
- Up to 25 files per batch
- ZIP or TAR archive output
Real-time Progress
- Server-Sent Events (SSE) for live updates
- Detailed conversion status per file
- Progress percentage tracking
Production Ready
- Automatic rate limiting
- File size validation
- Downloads available for one hour
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/status | Service availability and upload limits |
| GET | /api/formats | Supported formats and conversion matrix |
| POST | /api/convert | Submit conversion job |
| GET | /api/jobs/{id} | Get job status and progress |
| GET | /api/jobs/{id}/events | SSE stream for real-time updates |
| GET | /api/jobs/{id}/conversions | Detailed conversion information |
| GET | /api/jobs/{id}/download | Download conversion results |
Limits & Retention
File Limits
- Max file size: 25 MB
- Max batch size: 50 MB
- Max files per batch: 25 files
Concurrency & Retention
- Max concurrent jobs per IP: 5 jobs
- Archive retention: 1 hour
- Metadata retention: 24 hours
Code Examples
JavaScript (Fetch API)
// Submit conversion job
const formData = new FormData();
formData.append('files', fileInput.files[0]);
formData.append('targetFormats', 'WOFF,WOFF2');
formData.append('output', 'zip');
const response = await fetch('/api/convert', {
method: 'POST',
body: formData
});
if (!response.ok) throw new Error('Conversion request failed');
const { jobId, eventsUrl } = await response.json();
// Monitor progress with SSE
const eventSource = new EventSource(eventsUrl);
eventSource.onmessage = (event) => {
const progress = JSON.parse(event.data);
console.log(`Progress: ${progress.progress.processingPct}%`);
if (['COMPLETE', 'FAILED', 'EXPIRED'].includes(progress.status)) {
eventSource.close();
}
};
Python
import time
from urllib.parse import urljoin
import requests
# Submit conversion job
files = {'files': open('myfont.ttf', 'rb')}
data = {'targetFormats': 'WOFF,WOFF2', 'output': 'zip'}
response = requests.post('https://onlinefontconverter.com/api/convert',
files=files, data=data)
response.raise_for_status()
job = response.json()
# Poll for completion
while True:
status = requests.get(f"https://onlinefontconverter.com/api/jobs/{job['jobId']}")
status.raise_for_status()
job_data = status.json()
if job_data['status'] in ('FAILED', 'EXPIRED'):
raise RuntimeError(job_data.get('error') or job_data['status'])
if job_data['status'] == 'COMPLETE':
break
time.sleep(1)
# Download results
with open('converted.zip', 'wb') as f:
result = requests.get(urljoin('https://onlinefontconverter.com', job_data['downloadUrl']))
result.raise_for_status()
f.write(result.content)