BROWSER JS · CLIENT-SIDE · WASM

Convert JPEG to PDF in the browser.

Merge one or many JPEGs into a single, ordered PDF in the browser via WebAssembly. Files stay on the device. Nothing uploads, there's no server round-trip, and there's no backend to run, so conversion is instant and private.

100% client-side, zero upload Merge many JPEGs into one PDF Flat licence for every team
WHAT IT DOES

One or many JPEGs to a single PDF, locally

  • ✓ Runs entirely in the browser via WebAssembly, so nothing uploads to a server
  • ✓ Merge multiple JPEGs into one multi-page PDF, in the order you choose
  • ✓ Fit-to-page or fixed page size (A4, Letter) with adjustable margins
  • ✓ Auto-detects portrait vs. landscape and orients each page
  • ✓ Optional per-image compression to keep the output PDF small
  • ✓ Returns a Blob you can download, preview, or hand to your app
  • ✓ Works offline once loaded, so nothing hits the network
javascript
import { DocumentTools } from "@abscode/browser";

// runs fully client-side via WebAssembly, nothing is uploaded
const tools = await DocumentTools.load();
const files = document.querySelector("#files").files;

const pdf = await tools.jpegToPdf(files, {
  pageSize: "A4",
  margin: 24,
  fit: "contain",
});

saveBlob(pdf, "document.pdf"); // pdf is a Blob
USE CASES

Common scenarios

Privacy-first converters

Build a JPEG-to-PDF tool where images never leave the browser. A good fit for legal, health, and finance sites that can't send documents to a server.

Offline tools

Ship a converter that keeps working on flaky connections and air-gapped machines. Once the page loads, every conversion runs locally with no network call.

Receipt & invoice bundling

Let users pick a folder of receipt photos and merge them into one PDF for an expense report or accounting upload, kept in the order they select.

Photo-to-document

Turn phone photos of IDs, forms, and whiteboards into a clean, shareable PDF on the page, then hand it to your upload flow.

Web SaaS features

Add "export as PDF" to your dashboard or CRM without standing up a rendering service. Pair it with Browser Compression to shrink the result.

Embedded converters

Drop the converter into portals, intranets, or kiosk apps as a self-contained widget. See more formats on Browser Conversion.

PRICING

Priced for every team

Included in the browser SDK licence. Pricing shown in your local currency.

Affordable to all

Conversion runs on the user's device, so there are no per-page server costs to pass on. One flat licence covers a hobby project and millions of conversions alike.

See pricing →

FAQ

Common questions

How do I convert a JPEG to PDF in the browser without uploading it?
The conversion runs entirely in the browser through a WebAssembly module, so the image is read, rendered, and written to a PDF on the device. No file is uploaded, there is no server round-trip, and nothing leaves the page — which is why it suits legal, health, and finance tools that cannot send documents to a server.
Can I merge several JPEGs into a single PDF?
Yes. Pass multiple JPEGs and they become one multi-page PDF, a page per image, in exactly the order you supply them. This is the common path for bundling receipt or invoice photos into a single document for an expense report or upload.
Does the JPEG-to-PDF conversion work offline?
Yes. Once the page and the WebAssembly module have loaded, every conversion runs locally with no further network calls. It keeps working on flaky connections, air-gapped machines, and inside kiosk or intranet apps.
What page sizes and layouts can I set for the output PDF?
You can fit each image to a fixed page size such as A4 or Letter with adjustable margins, or scale the image to the page. Standard A-series layouts from A0 to A6 are supported, and portrait versus landscape is detected per image so every page is oriented correctly.
Which image formats can it convert besides JPEG?
The same engine reads JPEG, PNG, TIFF (single- and multi-page), and PDF as input. This page focuses on JPEG to PDF, but the underlying library also converts PNG to PDF and extracts pages from existing PDF or TIFF files.
How many images or how large a file can it convert?
There is no fixed page limit; large batches and multi-page TIFFs are supported. A streaming mode emits each page as it is produced, so a viewer can show the first page before the whole file finishes, and because the work runs on the user's device throughput scales with the client machine rather than a server quota.
How much code does it take, and what does each call return?
A single client-side call returns a Blob you can download, preview, or hand to your upload flow. Every method resolves with a structured result carrying a status, a description, and the data, and calls resolve instead of throwing — so error handling is a status check rather than a try/catch.
How is the browser JPEG-to-PDF tool licensed and priced?
It is included in one flat browser SDK licence with no per-page or per-conversion server costs, because conversion happens on the user's device. You can try it free first: the unlicensed demo is fully functional but adds a watermark band to the output. See the pricing page for current rates.
THE FULL TOOLKIT

Explore the rest of the Browser JS Library

One license, every capability — take this and you also get all of these.

Convert JPEG to PDF with the free trial

Free signup credit. No card required. Runs entirely in the browser.