100% client-side file conversion powered by WebAssembly
Fast, private, and secure file format conversion that runs entirely in your browser. No uploads, no servers, no tracking.
- π 100% Local Processing: Your files never leave your browser. Zero uploads, complete privacy.
- β‘ WebAssembly Performance: Native-speed conversion using Rust compiled to WASM.
- π¨ 7 Image Formats: PNG, JPG, WEBP, BMP, GIF, ICO, TIFF
- π΅ 6 Audio Formats: MP3, WAV, FLAC, OGG, AAC, M4A β WAV output
- π Batch Processing: Convert multiple files simultaneously (up to 2 concurrent jobs)
- β»οΈ Job Re-conversion: Change output format and reconvert without re-uploading
- π Real-time Status: Visual feedback with animated progress indicators
- πΎ Smart Memory Management: Automatic cleanup of download URLs and zero-copy where possible
- Rust 1.92.0 or higher
- Node.js 18.x or higher
- wasm-bindgen-cli 0.2.106
# Install Rust (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WASM target
rustup target add wasm32-unknown-unknown
# Install wasm-bindgen-cli
cargo install wasm-bindgen-cli --version 0.2.106# Navigate to Rust workspace
cd crates
# Compile to WebAssembly (release mode)
cargo build --target wasm32-unknown-unknown --release -p wasm-bindings
# Generate JavaScript bindings
wasm-bindgen target/wasm32-unknown-unknown/release/wasm_bindings.wasm \
--out-dir ../apps/web/public/wasm \
--target web \
--typescript# Navigate to Next.js app
cd apps/convert-killer
# Install dependencies
npm install
# Start dev server
npm run dev
# Open http://localhost:3000import { useConversionQueue } from "@/hooks/useConversionQueue";
function MyConverter() {
const { jobs, addFiles, updateJobFormat, startConversion } = useConversionQueue();
return (
<div>
<input
type="file"
accept="image/*"
onChange={(e) => addFiles(e.target.files!)}
/>
{jobs.map(job => (
<div key={job.id}>
<span>{job.name}</span>
<select onChange={(e) => updateJobFormat(job.id, e.target.value)}>
<option value="PNG">PNG</option>
<option value="JPG">JPG</option>
<option value="WEBP">WEBP</option>
</select>
<span>{job.status}</span>
</div>
))}
<button onClick={startConversion}>Convert</button>
</div>
);
}use converter_core::Converter;
pub struct MyConverter;
impl Converter for MyConverter {
fn supports(&self, format: &str) -> bool {
matches!(format.to_uppercase().as_str(), "FORMAT1" | "FORMAT2")
}
fn convert(&self, input: &[u8], source: &str, target: &str) -> Result<Vec<u8>, String> {
// Your conversion logic here
Ok(output_bytes)
}
}βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Browser β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β React UI Layer β β
β β (Next.js + TypeScript) β β
β ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β
β β useConversionQueue Hook β β
β β β’ Manages job queue (max 2 concurrent) β β
β β β’ Handles file reading via FileReader β β
β β β’ ObjectURL lifecycle management β β
β ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
β β postMessage β
β ββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β
β β Web Worker Thread β β
β β β’ Lazy loads WASM modules by category β β
β β β’ Caches modules for reuse β β
β β β’ Handles job cancellation β β
β ββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββ β
β β WebAssembly (Rust) β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β ImageConverter (image crate 0.25.9) β β β
β β β β’ PNG, JPG, WEBP, BMP, GIF, ICO, TIFF β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β β β AudioConverter (symphonia + hound) β β β
β β β β’ MP3, FLAC, OGG, AAC, M4A β WAV β β β
β β ββββββββββββββββββββββββββββββββββββββββββββββββββ β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Trait-based architecture:
Convertertrait allows easy extension - Lazy loading: WASM modules loaded on-demand by category
- Zero-copy optimizations: Direct references where possible (limited by Symphonia's
'staticrequirement) - Correct WAV encoding: Uses
houndlibrary for guaranteed header correctness - Next.js compatibility: Worker uses
URLconstructor for base path support
| Format | Input | Output | Notes |
|---|---|---|---|
| PNG | β | β | Transparency supported |
| JPG | β | β | No transparency |
| WEBP | β | β | Modern format |
| BMP | β | β | Legacy format |
| GIF | β | β | |
| ICO | β | β | Windows icons |
| TIFF | β | β | Professional format |
| Input Format | Output | Quality |
|---|---|---|
| MP3 | WAV | PCM 16-bit |
| FLAC | WAV | Lossless decode |
| OGG | WAV | Vorbis decode |
| AAC | WAV | AAC decode |
| M4A | WAV | AAC decode |
| WAV | WAV | Re-encode |
Note: Audio always outputs to WAV (PCM 16-bit signed) due to patent licensing restrictions on MP3/AAC encoding.
converter/
βββ crates/ # Rust workspace
β βββ core/ # Converter trait
β βββ image/ # Image converter
β βββ audio/ # Audio converter
β βββ wasm-bindings/ # JavaScript exports
βββ apps/
β βββ web/ # Next.js static files
β β βββ public/wasm/ # Compiled WASM
β βββ convert-killer/ # Main Next.js app
β βββ src/
β βββ components/ # React components
β βββ hooks/ # React hooks
β βββ models/ # TypeScript types
β βββ workers/ # Web Workers
β βββ utils/ # Utilities
βββ IMPLEMENTATION_GUIDE.md # Detailed documentation
# Test Rust converters
cd crates/image
cargo test
cd ../audio
cargo test
# Test TypeScript (when implemented)
cd apps/convert-killer
npm test# 1. Build WASM (optimized)
cd crates
cargo build --target wasm32-unknown-unknown --release -p wasm-bindings
wasm-bindgen target/wasm32-unknown-unknown/release/wasm_bindings.wasm \
--out-dir ../apps/web/public/wasm \
--target web \
--typescript
# 2. Build Next.js app
cd ../apps/convert-killer
npm run build
# 3. Deploy 'out/' directory to your static hostWe welcome contributions! Here's how you can help:
-
Implement the Converter trait in Rust:
// crates/myformat/src/lib.rs impl Converter for MyFormatConverter { fn supports(&self, format: &str) -> bool { ... } fn convert(&self, input: &[u8], source: &str, target: &str) -> Result<Vec<u8>, String> { ... } }
-
Export to WASM:
// crates/wasm-bindings/src/lib.rs #[wasm_bindgen] pub fn convert_myformat(input: &[u8], source: &str, target: &str) -> Result<Vec<u8>, JsValue> { // Use your converter }
-
Update Worker:
// apps/convert-killer/src/workers/converter.worker.ts case "myformat": module = { convert: (input, source, target) => wasmModule.convert_myformat(input, source, target) };
-
Add format detection:
const FORMAT_CATEGORIES = { MYEXT: "myformat", // ... };
- Rust: Follow
rustfmtdefaults - TypeScript: Use Prettier with project config
- Commits: Use Conventional Commits
- Fork the repository
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit changes (
git commit -m 'feat: add amazing feature') - Push to branch (
git push origin feat/amazing-feature) - Open a Pull Request
- Phase 1: Image conversion (7 formats)
- Phase 2: Audio conversion (6β1 formats)
- Phase 3: Web Worker architecture
- Phase 4: UX improvements
- Phase 5: Video conversion (FFmpeg WASM)
- Phase 6: Advanced features (quality slider, metadata preservation)
- Phase 7: Performance optimization (SIMD, multi-threading)
- Phase 8: i18n support (PT-BR, EN, ES)
- Animated GIFs: Only first frame is converted (limitation of
imagecrate) - Audio Output: Only WAV output due to MP3/AAC patent licensing
- Video: Not yet implemented (requires ~30MB FFmpeg WASM)
- Progress Reporting: No granular progress bars (WASM limitation)
See IMPLEMENTATION_GUIDE.md for detailed technical documentation.
This project is licensed under the MIT License - see the LICENSE file for details.
- image crate: MIT/Apache-2.0
- symphonia: MPL-2.0
- hound: Apache-2.0
- wasm-bindgen: MIT/Apache-2.0
- Next.js: MIT
Built with:
- π¦ Rust - Systems programming language
- πΈοΈ WebAssembly - Portable binary format
- βοΈ Next.js - React framework
- π¦ wasm-bindgen - Rust/JS interop
Inspired by the need for private, client-side file conversion tools.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: Implementation Guide
Made with β€οΈ and Rust