How to Convert JPG to PDF: 5 Free Methods That Work
You have a JPG. You need a PDF. Maybe it is a scanned receipt for an expense report, a signed form your landlord wants back as a document, or a batch of product photos that need to live in a single file for a client presentation. PDFs are the universal container — they look identical on every device, hold multiple pages in one file, print reliably without scaling surprises, and many institutions simply refuse to accept anything else.
The good news: every major operating system has a built-in way to do this, no extra software or sketchy upload-to-a-random-website required. Here is exactly how to convert JPG to PDF on every platform, plus command-line methods for developers who want to automate the process.
Convert JPG to PDF on Windows
Windows has shipped with a virtual PDF printer since Windows 10, so you do not need to install anything.
Single JPG to PDF
- Right-click your JPG file and select Open with > Photos (or just double-click it).
- Press Ctrl + P or click the print icon.
- Under Printer, select Microsoft Print to PDF.
- Choose your preferred paper size and orientation. For photos, Landscape and Fit to page usually prevent awkward cropping.
- Click Print.
- Pick a save location, name the file, and click Save.
That is it. The resulting PDF contains your image at full resolution.
Multiple JPGs into One PDF
- Open File Explorer and navigate to the folder with your JPGs.
- Select all the images you want (hold Ctrl and click each one, or Ctrl + A for all).
- Right-click the selection and choose Print.
- In the print dialog, set the printer to Microsoft Print to PDF.
- Windows shows a preview with each image on its own page. Use the side panel to pick a layout — Full page photo keeps one image per page at maximum size.
- Click Print and save the combined PDF.
One catch: Windows sorts files alphabetically by default. If page order matters, rename your files with numeric prefixes (01-cover.jpg, 02-intro.jpg) before selecting them.
Try it yourself
Convert between any image format instantly — free, instant, no signup. Your images never leave your browser.
Convert JPG to PDF on Mac
macOS Preview handles this natively, and it is faster than the Windows method.
Single JPG to PDF
- Double-click the JPG to open it in Preview.
- Go to File > Export as PDF.
- Choose a filename and location, then click Save.
Done. Three steps.
Multiple JPGs into One PDF
- Select all the JPG files in Finder.
- Right-click and choose Open With > Preview.
- Preview opens with a sidebar showing thumbnails of all images. Drag them into the order you want.
- Go to File > Print (or press Cmd + P).
- In the bottom-left corner of the print dialog, click the PDF dropdown and select Save as PDF.
- Name the file and save.
Preview also lets you drag additional images into the sidebar after opening, so you can build up a multi-page PDF incrementally. If you need to rotate a page, select its thumbnail and press Cmd + R (clockwise) or Cmd + L (counterclockwise).
Convert JPG to PDF on iPhone
iOS does not have an obvious "convert to PDF" button, but the print system handles it elegantly.
Using the Print Trick (No App Needed)
- Open the Photos app and find your JPG.
- Tap the Share button (the square with an arrow).
- Scroll down and tap Print.
- On the print preview screen, pinch outward on the preview image with two fingers (as if zooming in). This converts the print job into a PDF.
- You are now viewing a full-screen PDF preview. Tap the Share button again.
- Choose Save to Files, AirDrop it, or attach it to an email — your JPG is now a PDF.
Multiple JPGs into One PDF
- In Photos, tap Select and pick all the images you want.
- Tap the Share button.
- Tap Print.
- Pinch outward on any preview page to convert the entire batch to a multi-page PDF.
- Share or save the result.
The pinch-to-PDF gesture works across iOS — you can use it from Safari, Notes, or any app that supports printing.
Convert JPG to PDF on Android
Android's approach varies slightly by manufacturer, but Google's built-in tools work on all devices.
Using Google Photos
- Open the JPG in Google Photos.
- Tap the three-dot menu (top right) and select Print.
- Tap the printer dropdown at the top and select Save as PDF.
- Adjust paper size and orientation if needed.
- Tap the PDF icon (or download button) and choose where to save.
Using the Files App (Android 11+)
- Open your file manager and find the JPG.
- Tap Share and then Print.
- Select Save as PDF as the printer.
- Tap Save.
Multiple JPGs into One PDF
Android does not natively combine multiple images into one PDF as smoothly as the other platforms. Your best options:
- Google Docs: Create a new document, insert all your images, then download as PDF via File > Download > PDF Document.
- Google Drive: Upload the images, select them all, right-click, and choose Print > Save as PDF (available on the web version of Drive).
- Command line: If you are a developer, the next section covers automated batch conversion.
Convert JPG to PDF Using Command Line
For developers, command-line tools turn this into a one-liner — and they scale to thousands of images.
ImageMagick (v7.1.1-29)
ImageMagick is the Swiss Army knife of image processing. License: Apache 2.0.
Single file:
magick input.jpg output.pdf
Multiple files into one PDF:
magick *.jpg combined.pdf
With quality control (set JPEG quality in the embedded PDF to 85%):
magick *.jpg -quality 85 combined.pdf
Specific page size (fit images to A4):
magick input.jpg -resize 595x842 -gravity center -extent 595x842 output.pdf
Those dimensions (595×842) are A4 at 72 DPI. For letter size, use 612×792.
Python with Pillow (v10.4)
Pillow is Python's go-to imaging library. License: HPND (Historical Permission Notice and Disclaimer).
from PIL import Image
from pathlib import Path
# Single file
img = Image.open("input.jpg")
img.save("output.pdf", "PDF", resolution=100.0)
# Multiple files into one PDF
image_paths = sorted(Path(".").glob("*.jpg"))
images = [Image.open(p).convert("RGB") for p in image_paths]
images[0].save(
"combined.pdf",
"PDF",
resolution=100.0,
save_all=True,
append_images=images[1:]
)
Note the .convert("RGB") call. Pillow needs RGB mode for PDF output — RGBA images (like PNGs with transparency) will throw an error without it. If your JPGs started life as PNGs, this detail matters.
Python with img2pdf (v0.5)
img2pdf takes a different approach: it embeds the JPEG data directly into the PDF without re-encoding. This means zero quality loss and smaller file sizes. License: LGPL-3.0.
import img2pdf
from pathlib import Path
# Single file
with open("output.pdf", "wb") as f:
f.write(img2pdf.convert("input.jpg"))
# Multiple files
image_files = sorted(Path(".").glob("*.jpg"))
with open("combined.pdf", "wb") as f:
f.write(img2pdf.convert([str(p) for p in image_files]))
# With A4 page size
a4_layout = img2pdf.get_layout_fun((img2pdf.mm_to_pt(210), img2pdf.mm_to_pt(297)))
with open("a4_output.pdf", "wb") as f:
f.write(img2pdf.convert("input.jpg", layout_fun=a4_layout))
If you care about preserving exact image quality (archival scans, photography portfolios), img2pdf is the better choice over Pillow.
Node.js with pdf-lib (v1.17)
pdf-lib is a pure JavaScript library that works in Node.js and the browser. License: MIT.
import { PDFDocument } from 'pdf-lib';
import { readFile, writeFile } from 'fs/promises';
async function jpgToPdf(inputPath, outputPath) {
const pdfDoc = await PDFDocument.create();
const jpgBytes = await readFile(inputPath);
const jpgImage = await pdfDoc.embedJpg(jpgBytes);
const page = pdfDoc.addPage([jpgImage.width, jpgImage.height]);
page.drawImage(jpgImage, {
x: 0,
y: 0,
width: jpgImage.width,
height: jpgImage.height,
});
const pdfBytes = await pdfDoc.save();
await writeFile(outputPath, pdfBytes);
}
jpgToPdf('input.jpg', 'output.pdf');
For multiple images, loop through your files and call addPage for each one before saving. pdf-lib keeps everything in memory, so watch your RAM usage with very large batches (500+ high-resolution images).
JPG vs PDF: When to Use Which
| Feature | JPG | |
|---|---|---|
| File size | Small (lossy compression) | Varies (can be larger with embedded images) |
| Image quality | Degrades with each re-save | Preserves original quality of embedded images |
| Editing | Any image editor | Needs a PDF editor (or re-extract the image) |
| Multi-page | No — one image per file | Yes — unlimited pages in one file |
| Universal viewing | Requires image viewer | Opens on any device, any OS, any browser |
| Print reliability | May scale unpredictably | WYSIWYG — prints exactly as displayed |
| Metadata | EXIF (camera data, GPS) | Document metadata (author, title, keywords) |
| Best for | Photos, web images, social media | Documents, forms, portfolios, archival |
The short version: JPG is for images you want to display. PDF is for images you want to deliver. A product photo on your website should be a JPG (or better, a WebP or AVIF). A product catalog you email to a client should be a PDF.
Tips for Better JPG to PDF Conversion
Optimize Image Size Before Converting
A 5,000×3,000 pixel photo straight from a DSLR creates an unnecessarily large PDF. If the PDF is going to be viewed on screens or printed on standard paper, reduce the image size first. For A4 at 150 DPI (good enough for most screen viewing and casual printing), 1240×1754 pixels is plenty.
For print-quality output (300 DPI on A4), you want 2480×3508 pixels. Anything beyond that adds file size without visible benefit.
Compress Large JPGs First
If your JPGs are 3+ MB each and you are combining dozens into one PDF, the result can balloon quickly. Compress your JPEGs before conversion — a quality setting of 80-85% is visually indistinguishable from 100% for most photos but cuts file size by 40-60%.
Match Orientation to Content
Landscape photos in a portrait PDF waste half the page. Set orientation explicitly:
- Portrait: Documents, scanned text, vertical photos
- Landscape: Wide photos, presentation slides, screenshots
Most built-in converters auto-detect this, but the command-line tools default to portrait. Set it manually when your content is landscape.
Name Files for Sort Order
Every tool on every platform sorts input files before combining. If your page order matters, name files numerically:
01-title-page.jpg
02-introduction.jpg
03-chapter-one.jpg
Do not rely on modification dates. They shift when files are copied, downloaded, or synced.
Understand the Difference Between JPG and JPEG
There is no difference. JPG and JPEG are the same format — the three-letter extension exists because older versions of Windows required three-character file extensions. Every method in this guide works identically with both .jpg and .jpeg files.
FAQ
Does converting JPG to PDF reduce image quality?
It depends on the method. Tools like img2pdf embed the JPEG data directly without re-encoding, so quality stays identical to the original. The built-in print-to-PDF methods on Windows, Mac, iOS, and Android may re-encode the image, but at high quality settings the difference is imperceptible. ImageMagick re-encodes by default — use the -quality 100 flag to minimize loss, or use img2pdf for lossless embedding.
Can I convert multiple JPGs into a single PDF?
Yes, and every method in this guide supports it. On Windows, select multiple files and print to PDF. On Mac, open all images in Preview and export. On command line, magick *.jpg combined.pdf handles it in one shot. The Python examples above also show batch conversion.
How do I convert JPG to PDF without uploading to a website?
Every method in this guide runs locally on your device. The Windows, Mac, iOS, and Android methods use built-in OS tools — nothing is uploaded anywhere. The command-line tools (ImageMagick, Pillow, img2pdf, pdf-lib) all run offline. Your images stay on your hardware.
What is the maximum number of JPGs I can combine into one PDF?
There is no hard limit in the PDF specification. Practically, built-in OS tools handle dozens to low hundreds comfortably. Command-line tools handle thousands — img2pdf is particularly efficient because it does not re-encode images. The main constraint is available RAM: a batch of 1,000 high-resolution JPGs at 5 MB each needs roughly 5 GB of memory during conversion.
How do I convert other image formats (PNG, WebP, HEIC) to PDF?
The same methods work for PNG files — see our PNG to PDF guide for format-specific tips, especially around transparency handling. For HEIC files, see our HEIC to PDF guide for platform-specific steps. For WebP or AVIF files, convert them to JPG or PNG first using Pixotter's image format converter, then use any method above. Our complete image-to-PDF guide covers all formats in detail. If you are on an iPhone, the iPhone image-to-PDF guide covers the three built-in iOS methods.
Can I control the page size and margins when converting JPG to PDF?
The built-in OS methods use your selected paper size (A4, Letter, etc.) and apply default margins. For precise control, the command-line tools are your best option. ImageMagick's -resize and -extent flags let you set exact page dimensions. img2pdf's layout_fun parameter gives you control over page size, margins, and image positioning. pdf-lib lets you specify page dimensions in points (1 point = 1/72 inch) when calling addPage.
Need to convert between image formats before creating your PDF? Pixotter's free image converter handles JPG, PNG, WebP, and AVIF conversions instantly in your browser — no uploads, no installs.
Try it yourself
Combine images into a single PDF document — free, instant, no signup. Your images never leave your browser.