Get started

How to convert images to PDF (free, no upload needed)

Turn JPG, PNG, or multiple images into a single PDF in seconds. Free browser-based tool, no sign-up, files never leave your device.

benoitdedMarch 12, 20269 min read

A landlord needs to email a signed lease as a single file. A student submitting homework needs five photos in one document. A freelancer attaching receipts to an expense report needs everything in PDF. The common thread: turning images into a PDF is one of the most frequent document tasks, and it does not require any installed software.

Here is how to do it in seconds, entirely in your browser.

What happens when an image becomes a PDF

A PDF is a container format defined by the ISO 32000 standard. When you embed an image, the PDF wraps it in an Image XObject, a binary stream stored inside the file's structure. The image data itself is not modified.

The PDF specification supports two primary image encoding methods:

EncodingUsed forCompressionQuality
DCTDecodeJPEG imagesLossy (already compressed)Original JPEG quality preserved
FlateDecodePNG imagesLossless (zlib/deflate)Pixel-perfect, no quality loss

This means a JPEG embedded in a PDF remains at its original compression level, and a PNG remains lossless. No additional quality degradation occurs during the conversion.

How to convert images to PDF with PDF4.dev

The fastest method: a browser-based tool that processes everything locally.

  1. Open the Image to PDF tool
  2. Drop your JPG or PNG files onto the upload area (multiple files accepted)
  3. Click download

Each image becomes one page. The page dimensions match the image dimensions exactly, so there is no cropping, stretching, or white borders. Your files are never uploaded to any server, processing runs entirely in your browser via pdf-lib.

Convert images to PDF, freeTry it free

Which image formats work best for PDF conversion

Not all image formats are equal when it comes to PDF embedding. The two natively supported formats in the PDF spec are JPEG and PNG.

JPEG: best for photographs

JPEG uses lossy compression based on the Discrete Cosine Transform. At typical quality settings (80-95%), the compression ratio reaches approximately 10:1 compared to uncompressed data, with visually imperceptible loss at normal viewing sizes.

Best for: photos, scanned documents, camera captures, screenshots with gradients.

PNG: best for graphics and text

PNG uses lossless compression (zlib/deflate), preserving every pixel exactly. It also supports transparency (alpha channel), which JPEG does not.

Best for: screenshots with text, diagrams, charts, logos, any image where sharp edges matter.

Other formats and how to handle them

FormatNative PDF supportWhat to do
JPEGYesUse directly
PNGYesUse directly
WebPNoConvert to PNG or JPG first (most browsers can Save As)
HEIC/HEIFNoConvert to JPG (see iPhone section below)
TIFFPartialConvert to PNG for lossless, JPG for smaller size
BMPNoConvert to PNG (lossless, much smaller file)
SVGNo (vector)Open in browser, print/export to PDF for vector quality
GIFNoConvert to PNG (preserves transparency)

The MDN image format guide provides a detailed comparison of all web image formats, including their compression characteristics, transparency support, and browser compatibility.

How to combine multiple images into one PDF

When you drop several files at once, the tool creates a multi-page PDF: one image per page, in the order you provided them.

The page size adapts to each image individually. If your first image is 1920x1080 (landscape) and your second is 1080x1920 (portrait), the PDF will have a landscape first page and a portrait second page. No content is lost to forced margins or standardized page sizes.

Page ordering tips

  • Name your files with a numeric prefix (01-front.jpg, 02-back.jpg) so your file picker sorts them correctly
  • On macOS, Cmd+click to select files in a specific order
  • On Windows, Ctrl+click for the same behavior
  • The tool preserves the drop order, so organize before dropping

Image resolution and PDF quality

Image quality in a PDF depends entirely on the source image, since no re-compression happens during conversion.

DPI and print quality

DPI (dots per inch) determines how sharp an image looks when printed. Standard printing guidelines define these thresholds:

DPIQualityBest for
72Screen onlyDigital viewing, email attachments
150Acceptable printInternal documents, drafts
300Professional printClient-facing documents, portfolios

A 4000x3000 pixel photo printed on A4 (210x297mm per ISO 216) yields approximately 480 DPI, well above print quality. A 1920x1080 screenshot on the same page yields about 230 DPI, acceptable for most uses.

How to check your image resolution

  • macOS: right-click the image, Get Info, look under "More Info" for pixel dimensions
  • Windows: right-click, Properties, Details tab, look for Width and Height
  • Online: the tool itself shows the resulting page dimensions after conversion

If your source images are too low resolution for print, the PDF will faithfully reproduce that low resolution. Converting does not add pixels that were never there.

How to convert iPhone photos (HEIC) to PDF

Since iOS 11 (2017), iPhones capture photos in HEIC (High Efficiency Image Container) format by default. HEIC uses the HEVC codec and achieves approximately 50% smaller file sizes than JPEG at equivalent quality.

However, HEIC is not supported in the PDF specification, so you need to convert to JPG or PNG first.

Automatic conversion (easiest)

Most sharing workflows already convert HEIC to JPEG automatically:

  • AirDrop to Mac: delivers HEIC as-is (then use Preview to export as JPEG)
  • Email/Messages: iOS converts to JPEG before sending
  • Files app: share to the Image to PDF tool after saving as JPEG

Manual conversion on iPhone

  1. Open Settings, then Camera, then Formats
  2. Select "Most Compatible" instead of "High Efficiency"
  3. All new photos will be captured as JPEG

Manual conversion on Mac

  1. Open the HEIC file in Preview
  2. File, then Export
  3. Choose JPEG or PNG as the format
  4. Save and use the exported file with the Image to PDF tool

How to convert images to PDF on different platforms

macOS (built-in Preview)

  1. Select all images in Finder
  2. Right-click, then Open With, then Preview
  3. Select All (Cmd+A) in the Preview sidebar
  4. File, then Print, then PDF, then Save as PDF

This method works but gives you limited control over page sizing and order. The PDF4.dev Image to PDF tool preserves exact image dimensions without margins.

Windows (built-in Print to PDF)

  1. Select all images in File Explorer
  2. Right-click, then Print
  3. Choose "Microsoft Print to PDF" as the printer
  4. Click Print and choose a save location

Windows forces images into a standard page layout with margins, which may crop or letterbox your images.

Linux (ImageMagick)

convert image1.jpg image2.png output.pdf

ImageMagick handles batch conversion well but requires installation. For a simpler approach, the browser-based tool works on any Linux distribution.

Mobile (iOS and Android)

Both platforms have "Print to PDF" functionality, but the browser-based tool at pdf4.dev/tools/image-to-pdf works directly on mobile browsers with no app installation.

How to reduce the size of an image-based PDF

After converting images to PDF, the file size roughly equals the sum of your original images. A batch of 20 photos at 3 MB each produces a ~60 MB PDF.

To reduce the size:

  1. Before conversion: resize images to the resolution you actually need. A 4000x3000 photo destined for on-screen viewing does not need more than 1920x1080
  2. After conversion: use the Compress PDF tool to downsample images to 150 DPI (web quality) or 72 DPI (screen quality), reducing file size by 50-80% with acceptable quality
ApproachFile size reductionQuality impact
Resize images before conversion50-75%None (you remove unused pixels)
Compress PDF at 150 DPI40-60%Minimal (fine for screens and standard print)
Compress PDF at 72 DPI60-80%Noticeable on high-res displays, fine for email
Both combined70-90%Depends on target DPI
Compress your PDF after conversionTry it free

Image to PDF for developers: the API approach

If you need to convert images to PDF programmatically (batch processing, automated workflows, server-side generation), the PDF4.dev API handles this via HTML templates.

Embed images in an HTML template using <img> tags with base64-encoded data or URLs, then render to PDF:

The PDF4.dev API renders any HTML to PDF, including pages with embedded images, CSS layout, and custom fonts. This gives you full control over page sizing, margins, multi-image layouts, and styling, far beyond what a simple "image to PDF" conversion offers.

curl -X POST https://pdf4.dev/api/v1/render \
  -H "Authorization: Bearer p4_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<img src=\"https://example.com/photo.jpg\" style=\"width:100%;height:auto\">",
    "format": { "preset": "a4", "margins": { "top": "0mm", "bottom": "0mm", "left": "0mm", "right": "0mm" } }
  }'

This approach is useful for:

  • Generating PDF photo albums with captions and layout
  • Creating reports that combine charts, diagrams, and data tables
  • Automating receipt or document scanning workflows
  • Building multi-page catalogs from product images

Frequently asked questions

Can I set a specific page size like A4 or Letter?

The browser tool sizes each page to match the image dimensions exactly. If you need standard page sizes (A4, Letter), use the PDF4.dev API where you can set format.preset to a4, letter, or any custom size, and control margins.

Can I add text or captions to my image PDF?

Not with the basic conversion tool. For images with text, headers, or captions, use the PDF4.dev template editor where you can combine <img> tags with HTML text and CSS styling.

Is there a file size or page limit?

No hard limit. Since processing happens in your browser, the practical limit depends on your device's available memory. Most devices handle 50-100 images without issues. For very large batches (500+ images), split into smaller groups and merge the resulting PDFs.

Why not just use "Print to PDF"?

The "Print to PDF" function in operating systems forces images into a page layout with margins, headers, and fixed page sizes. This often crops landscape images or adds unwanted white borders. The Image to PDF tool preserves exact image dimensions with no modifications.

Free tools mentioned:

Image To PdfTry it freeCompress PdfTry it free

Start generating PDFs

Build PDF templates with a visual editor. Render them via API from any language in ~300ms.