How In-Browser (WebAssembly) File Conversion Works—and What Happens to Your File
An engineering look inside Fileora's client-side architecture: how HTML5 File APIs, Web Workers, SharedArrayBuffer, and WebAssembly (FFmpeg, LibreOffice, PDF.js, Tesseract) convert files in device RAM with zero server uploads.
Server-Side Cloud Converters vs. Client-Side In-Browser Conversion
For the past twenty years, almost every online file converter on the internet worked the exact same way: when you selected a bank statement PDF, a tax spreadsheet, a medical scan, or a private family video, the website uploaded your file over HTTPS to a remote cloud server (typically an AWS EC2 container or S3 bucket). A backend Linux worker ran a command-line tool like FFmpeg, ImageMagick, or LibreOffice on their server, wrote the output to a public download bucket, and sent you a link.
That traditional server-side architecture has three fundamental problems: First, you surrender physical custody of your confidential documents to an unknown third party. Second, you pay a double bandwidth penalty—uploading a 400 MB video over a typical mobile or home broadband connection takes minutes before the conversion even starts, and then you have to download the output all over again. Third, because cloud compute costs money per CPU-second, server-side converters lock users behind 2-files-per-day paywalls, artificial 25 MB upload caps, and slow waiting queues.
Fileora flips that model completely on its head. Instead of sending your data to a remote server where the software lives, Fileora sends the compiled conversion software to your browser where your data already lives.
| Architectural Stage | Traditional Cloud Converter | Fileora In-Browser Architecture |
|---|---|---|
| 1. File Selection | Streams file bytes over the internet via HTTP POST | Reads local disk pointer via HTML5 File / Blob API (0 network bytes) |
| 2. Execution Environment | Remote third-party Linux server / cloud bucket | Sandboxed Web Worker + WebAssembly VM in your device RAM |
| 3. Network Activity | Uploads full input file + downloads full output file | Downloads static .wasm engine once (cached in CacheStorage); 0 file uploads |
| 4. Data Retention | Stored on remote disks (typically 1–24 hours or longer) | Held only in volatile tab RAM; erased the instant you close the tab |
| 5. Offline Capability | Impossible (requires live server upload) | Works offline once the static conversion engine is cached |
What Happens millisecond-by-millisecond When You Drop a File in Fileora
When you drag a file onto Fileora's dropzone or pick a file from your phone storage, five distinct browser subsystems coordinate to convert your file without touching the network:
1. Local File Reference & Magic-Byte Sniffing (`lib/convert/detect.ts`): The browser's `<input type="file">` or `DataTransfer` API grants the page a read-only `File` handle. Before trusting the filename extension (since users frequently rename `.webp` or `.heic` files to `.jpg`), Fileora slices just the first 64 bytes of the file (`file.slice(0, 64).arrayBuffer()`) and inspects the hexadecimal magic signature (`0x25 50 44 46` for `%PDF`, `0x89 50 4E 47` for PNG, `0x4F 67 67 53` for Ogg, `0x37 7A BC AF` for 7z) to identify the true binary format.
2. Zero-Copy Web Worker Transfer (`lib/convert/worker-pool.ts`): Running heavy CPU loops on the browser's main UI thread would freeze scrolling and button clicks. Fileora reads your file into an `ArrayBuffer` and transfers ownership of that memory buffer directly to a background Web Worker thread using `worker.postMessage(msg, [buffer])`. Transferring an `ArrayBuffer` moves the memory pointer in sub-millisecond time without duplicating RAM.
3. Dual-Tier Execution (Tier 1 Native/JS vs. Tier 2 WebAssembly): Inside the worker, lightweight formats (Tier 1—such as JSON/YAML/CSV, SRT/VTT subtitles, ZIP/TAR via `fflate`, TTF/WOFF2 fonts, and standard raster images via `OffscreenCanvas` and `@jsquash` codecs) convert immediately. Heavy multimedia, office, and OCR formats (Tier 2—such as video/audio via FFmpeg, DOCX/ODS/PPTX to PDF via LibreOffice, EPUB via Pandoc, and scanned PDFs via Tesseract OCR) run inside a compiled WebAssembly (`.wasm`) virtual filesystem (`MEMFS`) governed by a serial mutex queue (`HeavyEngineMutexQueue`) so two heavy jobs never exhaust tab RAM.
4. Local Blob Generation & Memory Cleanup: When the engine finishes writing the output bytes into the WASM virtual filesystem, the worker transfers the output `ArrayBuffer` back to the main thread, wraps it in a `new Blob([outputBuffer], { type: mimeType })`, and generates a local `blob:https://fileora.app/...` URL. Clicking Download saves that RAM buffer straight to your device's Downloads folder. Immediately after cleanup or tab close, `URL.revokeObjectURL()` releases the memory.
Why Scoped Cross-Origin Isolation (COOP/COEP) Matters for Speed
Multi-threaded WebAssembly (such as `@ffmpeg/core-mt`, which uses POSIX threads across multiple CPU cores to transcode video 2× to 4× faster) requires the browser's `SharedArrayBuffer` API. For security against Spectre timing attacks, modern browsers only enable `SharedArrayBuffer` on pages served with `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Embedder-Policy: require-corp` headers.
In `next.config.ts`, Fileora scopes those strict COOP/COEP headers specifically to active conversion workspaces (`/convert/*` and `/tools/*`), enabling multi-threaded WebAssembly where supported while automatically falling back to single-threaded `@ffmpeg/core` on browsers or environments where `SharedArrayBuffer` is unavailable.
How to Verify Client-Side Privacy Yourself in 60 Seconds
You never have to take any website's privacy policy on faith when you can inspect the network stack directly:
- 1Open any converter page on Fileora (for example, /convert/docx-to-pdf or /convert/aac-to-mp3).
- 2Press F12 (Windows/Linux) or Cmd+Option+I (Mac) to open browser Developer Tools, and click the Network tab.
- 3Click the Clear button (🚫) in the Network panel, then drop a file into Fileora and click Convert.
- 4Inspect the Network panel: on your very first conversion of a Tier 2 format, you may see a `GET` request downloading a static `.wasm` engine binary (and caching it in CacheStorage). You will see zero `POST` or `PUT` requests uploading your file, and zero outbound transfers containing your filename or file bytes.
Recommended In-Browser Tools & Specifications
Run the conversions and techniques described in this guide locally in your browser: