Understanding how your files are processed securely
Current capability note: UniFile currently supports
browser-native conversion for images and text-based documents. PDF is
supported for merging, and multi-file output can be saved directly into
a user-selected folder.
Privacy & Security
🔒 Your Files Never Leave Your Device
UniFile processes all files entirely within your web browser. There
are no servers receiving your data, no uploads, and no data
collection whatsoever. Your privacy is guaranteed by design.
What This Means
No Upload: Your files are never sent to any server.
Everything happens locally.
No Storage: We don't store your files anywhere.
Once you close the tab, the data is gone.
No Tracking: We don't track what files you convert
or any usage patterns.
Works Offline: After the initial page load, you can
even use UniFile without an internet connection.
Open Source: The code is fully transparent and
available on GitHub for inspection.
Technical Privacy Guarantees
UniFile uses browser-native APIs and WebAssembly to process files.
Here's what happens technically:
When you drop a file, it's read into your browser's memory using the
FileReader API
Processing happens using JavaScript and WebAssembly libraries
running in your browser
The converted file is created as a Blob object in
memory
When you download, your browser saves the Blob directly to your
device
No network requests are made during any of these steps
How Data Processing Works
Understanding the complete journey of your file from upload to
download:
1
File Selection
When you drag & drop or click to select files, the browser's
File API creates a reference to your file. The file stays on
your disk - only a pointer is created in memory.
2
Format Detection
UniFile reads the file extension and first few bytes (magic
numbers) to accurately detect the file format. This determines
which processing pipeline to use.
3
File Reading
Using FileReader API, the file is read into browser memory as an
ArrayBuffer or DataURL. This is raw binary data that can be
processed by JavaScript.
4
Processing
Depending on the file type, different processing engines are
used: • Images: HTML5 Canvas API • PDFs: pdf-lib
WebAssembly library • HEIC: heic2any converter •
Documents: Showdown for Markdown, DOM APIs for HTML
5
Output Generation
The processed data is converted to the target format and
packaged as a Blob object. This is an efficient binary
representation that exists only in memory.
6
Download
A temporary object URL is created for the Blob, and the
browser's download mechanism saves it directly to your device.
The URL is immediately revoked after download starts.
Image Processing
Images are processed using the HTML5 Canvas API, which provides native
browser support for image manipulation.
Conversion Process
Load Image: The image is loaded into an
HTMLImageElement
Draw to Canvas: The image is drawn onto a 2D canvas
context at full resolution
Export: The canvas is exported using
canvas.toBlob() with the target MIME type
Quality Control: For lossy formats (JPEG, WebP),
the quality parameter is applied during export
HEIC files (common on iPhones) require special handling since browsers
don't natively support them. We use the
heic2any library which:
Decodes HEIC using a WebAssembly-based decoder
Converts to JPEG or PNG format that browsers can display
Preserves image quality during conversion
⚠️ Browser Encoding Limitation
UniFile only shows image output formats the browser can create
reliably: PNG, JPG, WebP, and PDF. HEIC, HEIF, GIF, BMP, and SVG can
be used as inputs where browser support allows, but they are not
offered as image output formats.
Document Processing
PDF Operations
PDF processing uses the pdf-lib library, a powerful
WebAssembly-based PDF manipulation tool:
PDF Merging: Copies pages from multiple PDFs into a
new document
Image to PDF: Embeds images as full-page content
Text to PDF: Renders text content with proper
pagination
// PDF merging with pdf-libconst { PDFDocument } = PDFLib;
const mergedPdf =
await PDFDocument.create();
for (const
file of files) {
const pdf =
await PDFDocument.load(file);
const pages =
await mergedPdf.copyPages(pdf,
pdf.getPageIndices()); pages.forEach(page => mergedPdf.addPage(page));
}
const pdfBytes =
await mergedPdf.save();
Markdown Processing
Markdown files are converted using Showdown, a
JavaScript Markdown-to-HTML converter:
Supports standard Markdown syntax
Converts headings, lists, links, code blocks, and more
Output is wrapped in a styled HTML document
HTML/Text Processing
HTML and text files are processed using native browser APIs:
HTML to Text: Uses DOMParser to extract text
content
Text to HTML: Wraps content in pre-formatted HTML
Text to PDF: Renders with proper line breaking and
pagination
Merge Processing (Cross-Format)
UniFile's merge mode allows combining files from different formats
into a single output:
🔗 Universal Merge
You can mix images (JPG, PNG, HEIC) with documents (PDF, TXT,
Markdown) and merge them all into a single PDF. Each file type is
handled appropriately.
How Cross-Format Merge Works
File Detection: Each file's category (image,
document, etc.) is detected
Individual Processing: Based on category:
Images → Converted to full-page PDF pages
PDFs → Pages are copied directly
Text/Markdown/HTML → Converted to formatted PDF pages
Order Preservation: Files are added in the order
you arranged them (drag to reorder)
Single Output: All pages are combined into one PDF
document
Drag-and-Drop Reordering
Before merging, you can drag files in the list to change their order.
This determines the page order in the final merged PDF.
Technologies Used
UniFile is built with modern web technologies that enable powerful
processing entirely in the browser:
pdf-lib
WebAssembly-based PDF creation and manipulation. Creates,
modifies, and merges PDFs without any server.
heic2any
Converts HEIC/HEIF images (iPhone photos) to web-compatible
formats like JPEG and PNG.
Showdown
Markdown to HTML converter. Transforms Markdown documents into
properly formatted HTML.
Canvas API
Native browser API for image manipulation. Handles format
conversion and quality settings.
File API
Browser API for reading files from your device without uploading
them anywhere.
Blob API
Creates downloadable file objects entirely in memory for secure,
instant downloads.
Why Client-Side Processing?
Privacy: Your files never leave your device
Speed: No upload/download time - processing is
instant
Reliability: Works offline after initial page load
No Limits: No file size restrictions or daily
quotas
Free Forever: No server costs means free service
for everyone