Truly universal online file converter
See the codeTruly universal online file converter.
Many online file conversion tools are boring and insecure. They only allow conversion between two formats in the same medium (images to images, videos to videos, etc.), and they require that you upload your files to some server.
This is not just terrible for privacy, it's also incredibly lame. What if you really need to convert an AVI video to a PDF document? Try to find an online tool for that, I dare you.
Convert.to.it aims to be a tool that "just works". You're almost guaranteed to get an output - perhaps not always the one you expected, but it'll try its best to not leave you hanging.
For a semi-technical overview of this tool, check out the video: https://youtu.be/btUbcsTbVA8
Ever since the YouTube video released, we've been getting spammed with issues suggesting the addition of all kinds of niche file formats. To keep things organized, I've decided to specify what counts as a valid issue and what doesn't.
[!IMPORTANT] SIMPLY ASKING FOR A FILE FORMAT TO BE ADDED IS NOT A MEANINGFUL ISSUE!
There are thousands of file formats out there. It can take hours to add support for just one. The math is simple - we can't possibly support every single file. As such, simply listing your favorite file formats is not helpful. We already know that there are formats we don't support, we don't need tickets to tell us that.
When suggesting a file format, you must at minimum:
If this seems like a lot, please remember - a developer will have to do 100x more work to actually implement the format. Doing a bit of research not only saves them precious time, it also weeds out "unserious" proposals that would only bloat our to-do list.
If you're submitting a bug report, you only need to do step 1 - check if the problem isn't already reported by someone else. Bug reports are generally quite important otherwise.
Though please note, "converting X to Y doesn't work" is not a bug report. However, "converting X to Y works but not how I expected" likely is a bug report.
git clone https://github.com/p2r3/convert.bun install to install dependencies.bun run dev to prepare and start the development server.The following steps are optional, but recommended for performance:
When you first open the page, it'll take a while to generate the list of supported formats for each tool. If you open the console, you'll see it complaining a bunch about missing caches.
You can generate this list beforehand and save it into dist/ by running bun run cache:build after bun run build. If you run into issues where your changes seem to not be applying, try deleting dist/cache.json.
Docker compose files live in the docker/ directory, so run compose with -f from the repository root:
docker compose -f docker/docker-compose.yml up -d
Alternatively download the docker-compose.yml separately and start it by executing docker compose up -d in the same directory.
This runs the container on http://localhost:8080/convert/.
Use the override file to build the image locally:
docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml up --build -d
The first Docker build is expected to be slow because Chromium and related system packages are installed in the build stage (needed for puppeteer in buildCache.js). Later builds are usually much faster due to Docker layer caching.
Run bun run build and then bun run cache:build. Then serve the dist/ folder on any HTTP server of your choice.
The best way to contribute is by adding support for new file formats (duh). If you don't have a format to add but are eager to help, take a look at our issues. There are plenty of suggestions there.
Here's how adding a format works works:
Each "tool" used for conversion has to be normalized to a standard form - effectively a "wrapper" that abstracts away the internal processes. These wrappers are available in src/handlers.
Below is a super barebones handler that does absolutely nothing. You can use this as a starting point for adding a new format:
// file: dummy.ts
import type { FileData, FileFormat, FormatHandler } from "../FormatHandler.ts";
import Formats from "src/Formats.ts";
class dummyHandler implements FormatHandler {
public readonly name = "dummy";
public supportedFormats = [
Formats.PNG.builder("png").lossless().fromTo(),
// modifiers go before the direction
Formats.GIF.builder("gif").to(),
// add custom formats to Formats.ts
];
public ready = false;
async init() {
this.ready = true;
}
async doConvert(
inputFiles: FileData[],
inputFormat: FileFormat,
outputFormat: FileFormat,
): Promise<FileData[]> {
const outputFiles: FileData[] = [];
return outputFiles;
}
}
export default dummyHandler;
After that, make sure to add add dummy: [] into the HANDLERS array in src/handlers/index.ts so it can be used in conversions.
For more details on how all of these components work, refer to the doc comments in src/FormatHandler.ts. You can also take a look at existing handlers to get a more practical example.
There are a few additional things that I want to point out in particular:
dummy, then the class should be called dummyHandler, and the file should be called dummy.ts.new Uint8Array().HTMLCanvasElement -> OffscreenCanvas (toBlob() -> convertToBlob()), new Image() -> createImageBitmap(), avoid web audio and DOM APIs where possible. offload is last resort.This project currently uses two levels of tests:
test/ (for example graph traversal and end-to-end conversion smoke tests).test/handlers/, using the file name pattern <handlerName>.test.ts. These are a good fit for handlers with meaningful parsing, serialization, or file-naming logic that is hard to exercise reliably through traversal alone.Not every handler needs a dedicated unit test, but handlers with non-trivial custom internal logic may benefit from having one.
If your tool requires an external dependency (which it likely does), there are currently two well-established ways of going about this:
npm package, just install it to the project like you normally would.bun run build:add <name> <tar.gz or zip url>, then bun run build:assemble, then import from the built/<name> folder. The full reference is under recipe/README.md.Please do not use CDNs (Content Delivery Networks). They're really cool on paper, but they don't work well with TypeScript, and each one introduces a tiny bit of instability. For a project that leans heavily on external dependencies, those bits of instability can add up fast.
import wasmUrl from "node_modules/stuff/wasm.wasm?url" (or copy it into the output using vite.config.js). Don't try to fetch stuff from node_modules directly.If you intend to use an AI/agentic/LLM tool for your contribution, please follow these guidelines:
Not adhering to these rules will likely get your pull request closed.
I figure that there are people who'd prefer if I merged zero AI-written code, but I believe that's simply not feasible. Just from a code integrity perspective, it's much safer to be transparent about AI usage and define clear guidelines than to make it a taboo and risk people "sneaking in" unvetted AI code. Making things illegal doesn't stop everyone from doing those things - some will still do them, just in secret and with less oversight.
(top 24 of 33)
333 followers · starred Mar 2026
4,284 followers · starred Mar 2026
107 followers · starred Mar 2026
71 followers · starred Aug 2026
Truly universal online file converter
See the codeTruly universal online file converter.
Many online file conversion tools are boring and insecure. They only allow conversion between two formats in the same medium (images to images, videos to videos, etc.), and they require that you upload your files to some server.
This is not just terrible for privacy, it's also incredibly lame. What if you really need to convert an AVI video to a PDF document? Try to find an online tool for that, I dare you.
Convert.to.it aims to be a tool that "just works". You're almost guaranteed to get an output - perhaps not always the one you expected, but it'll try its best to not leave you hanging.
For a semi-technical overview of this tool, check out the video: https://youtu.be/btUbcsTbVA8
Ever since the YouTube video released, we've been getting spammed with issues suggesting the addition of all kinds of niche file formats. To keep things organized, I've decided to specify what counts as a valid issue and what doesn't.
[!IMPORTANT] SIMPLY ASKING FOR A FILE FORMAT TO BE ADDED IS NOT A MEANINGFUL ISSUE!
There are thousands of file formats out there. It can take hours to add support for just one. The math is simple - we can't possibly support every single file. As such, simply listing your favorite file formats is not helpful. We already know that there are formats we don't support, we don't need tickets to tell us that.
When suggesting a file format, you must at minimum:
If this seems like a lot, please remember - a developer will have to do 100x more work to actually implement the format. Doing a bit of research not only saves them precious time, it also weeds out "unserious" proposals that would only bloat our to-do list.
If you're submitting a bug report, you only need to do step 1 - check if the problem isn't already reported by someone else. Bug reports are generally quite important otherwise.
Though please note, "converting X to Y doesn't work" is not a bug report. However, "converting X to Y works but not how I expected" likely is a bug report.
git clone https://github.com/p2r3/convert.bun install to install dependencies.bun run dev to prepare and start the development server.The following steps are optional, but recommended for performance:
When you first open the page, it'll take a while to generate the list of supported formats for each tool. If you open the console, you'll see it complaining a bunch about missing caches.
You can generate this list beforehand and save it into dist/ by running bun run cache:build after bun run build. If you run into issues where your changes seem to not be applying, try deleting dist/cache.json.
Docker compose files live in the docker/ directory, so run compose with -f from the repository root:
docker compose -f docker/docker-compose.yml up -d
Alternatively download the docker-compose.yml separately and start it by executing docker compose up -d in the same directory.
This runs the container on http://localhost:8080/convert/.
Use the override file to build the image locally:
docker compose -f docker/docker-compose.yml -f docker/docker-compose.override.yml up --build -d
The first Docker build is expected to be slow because Chromium and related system packages are installed in the build stage (needed for puppeteer in buildCache.js). Later builds are usually much faster due to Docker layer caching.
Run bun run build and then bun run cache:build. Then serve the dist/ folder on any HTTP server of your choice.
The best way to contribute is by adding support for new file formats (duh). If you don't have a format to add but are eager to help, take a look at our issues. There are plenty of suggestions there.
Here's how adding a format works works:
Each "tool" used for conversion has to be normalized to a standard form - effectively a "wrapper" that abstracts away the internal processes. These wrappers are available in src/handlers.
Below is a super barebones handler that does absolutely nothing. You can use this as a starting point for adding a new format:
// file: dummy.ts
import type { FileData, FileFormat, FormatHandler } from "../FormatHandler.ts";
import Formats from "src/Formats.ts";
class dummyHandler implements FormatHandler {
public readonly name = "dummy";
public supportedFormats = [
Formats.PNG.builder("png").lossless().fromTo(),
// modifiers go before the direction
Formats.GIF.builder("gif").to(),
// add custom formats to Formats.ts
];
public ready = false;
async init() {
this.ready = true;
}
async doConvert(
inputFiles: FileData[],
inputFormat: FileFormat,
outputFormat: FileFormat,
): Promise<FileData[]> {
const outputFiles: FileData[] = [];
return outputFiles;
}
}
export default dummyHandler;
After that, make sure to add add dummy: [] into the HANDLERS array in src/handlers/index.ts so it can be used in conversions.
For more details on how all of these components work, refer to the doc comments in src/FormatHandler.ts. You can also take a look at existing handlers to get a more practical example.
There are a few additional things that I want to point out in particular:
dummy, then the class should be called dummyHandler, and the file should be called dummy.ts.new Uint8Array().HTMLCanvasElement -> OffscreenCanvas (toBlob() -> convertToBlob()), new Image() -> createImageBitmap(), avoid web audio and DOM APIs where possible. offload is last resort.This project currently uses two levels of tests:
test/ (for example graph traversal and end-to-end conversion smoke tests).test/handlers/, using the file name pattern <handlerName>.test.ts. These are a good fit for handlers with meaningful parsing, serialization, or file-naming logic that is hard to exercise reliably through traversal alone.Not every handler needs a dedicated unit test, but handlers with non-trivial custom internal logic may benefit from having one.
If your tool requires an external dependency (which it likely does), there are currently two well-established ways of going about this:
npm package, just install it to the project like you normally would.bun run build:add <name> <tar.gz or zip url>, then bun run build:assemble, then import from the built/<name> folder. The full reference is under recipe/README.md.Please do not use CDNs (Content Delivery Networks). They're really cool on paper, but they don't work well with TypeScript, and each one introduces a tiny bit of instability. For a project that leans heavily on external dependencies, those bits of instability can add up fast.
import wasmUrl from "node_modules/stuff/wasm.wasm?url" (or copy it into the output using vite.config.js). Don't try to fetch stuff from node_modules directly.If you intend to use an AI/agentic/LLM tool for your contribution, please follow these guidelines:
Not adhering to these rules will likely get your pull request closed.
I figure that there are people who'd prefer if I merged zero AI-written code, but I believe that's simply not feasible. Just from a code integrity perspective, it's much safer to be transparent about AI usage and define clear guidelines than to make it a taboo and risk people "sneaking in" unvetted AI code. Making things illegal doesn't stop everyone from doing those things - some will still do them, just in secret and with less oversight.
(top 24 of 33)
333 followers · starred Mar 2026
4,284 followers · starred Mar 2026
107 followers · starred Mar 2026
71 followers · starred Aug 2026