AshenConvert API
Make other apps depend on MirrorConvert, not the other way around. Convert supported files locally in your users’ browsers using a self-hostable JavaScript library, with zero usage fees, no account, and no conversion API calls.
Quick start · Classic script
<script src="https://mirrorconvert.pages.dev/ashenconvert.js"></script>
<input id="source" type="file">
<button id="go">Convert</button>
<script>
document.querySelector('#go').onclick = async () => {
const file = document.querySelector('#source').files[0];
if (!file) return;
const result = await AshenConvert.convert(file, {
to: 'docx', layout: 'positioned'
});
AshenConvert.download(result);
};
</script>ES modules
import AshenConvert from 'https://mirrorconvert.pages.dev/ashenconvert.mjs';
const options = AshenConvert.outputs('pdf');
const result = await AshenConvert.convert(file, {to: 'docx'});SDK interface
| Method | Description |
|---|---|
convert(file, {to, layout?, filename?}) | Produces {blob, name, mime, size, warnings} (plus source and to). |
outputs('pdf') | Lists supported output extensions for an input extension. |
supports('csv','xlsx') | Returns whether a route is implemented. |
inspect(file) | Input metadata, recognized format and outputs. |
formats({search,category,limit,...}) | Browse the 2,167-extension recognition catalog. |
extract(file) | Extract text and/or rows from supported source files. |
download(result) | Trigger a local browser download. |
PDF → Word layout mode
layout: 'positioned' (default) attempts to retain the physical page dimensions and text coordinates. layout: 'flowing' creates editable, reflowed paragraphs. Neither reproduces arbitrary graphics, scans, complex fonts, or every layout perfectly. OCR is not included.
Try the SDK here
Select a file. Nothing will be uploaded.
Offline and distribution
Download bundled JavaScript SDK · TypeScript declarations · API metadata · License and third-party attribution
Host a local copy of ashenconvert.js to avoid any runtime dependency on mirrorconvert.pages.dev. Because conversion runs locally, there is no central job queue, remote upload API, or server-side quota. Browser capabilities still determine some image codecs.