# Image to PDF

> Turn JPG, PNG, and WebP images into one PDF. Set the page size, orientation, margin, and order.

Free JPG to PDF and image to PDF converter. Drop JPG, PNG, or WebP pictures, put them in order, and choose A4, Letter, or a page that fits the picture. Portrait, landscape, or automatic orientation, with a margin. The PDF is built in the browser and the images are not uploaded.

- Page: https://benchline.fabwaseem.com/t/image-to-pdf
- Runs: in the browser. Input stays on the device.
- Price: free, no account
- Input: JPG, PNG, or WebP images, their order, a page size, an orientation, and a margin.
- Output: One PDF with one page per image.
- Keywords: jpg to pdf converter, image to pdf converter, png to pdf
- Updated: 2026-10-18
- Built by: Waseem Anjum (https://fabwaseem.com)

## How to use it

1. **Add images.** Drop JPG, PNG, or WebP files. They stay in this browser.
2. **Set size, orientation, and margin.** Pick A4, Letter, or Fit. Auto follows each image, or force portrait or landscape.
3. **Download the PDF.** The pages follow the list order. One image becomes one page.

## Use it from an AI agent

MCP tool name: `images_to_pdf`
MCP endpoint: https://benchline.fabwaseem.com/mcp (Streamable HTTP, no key)
HTTP: POST https://benchline.fabwaseem.com/api/v1/tools/image-to-pdf with the input as the JSON body
This call fetches a public URL on the server. Private addresses are refused.

Turn images, sent as base64 or public URLs in order, into one PDF. JPEG and PNG are embedded directly. Other formats are converted to PNG first. Page size is A4, Letter, or fit. Private addresses are refused. Returns the PDF as base64.

### Input schema

```json
{
  "type": "object",
  "properties": {
    "images": {
      "minItems": 1,
      "maxItems": 40,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "url": {
            "description": "Public http or https URL. Private and local addresses are refused.",
            "type": "string"
          },
          "data": {
            "description": "Base64 bytes or a data URI. Decoded size is capped at 10 MB.",
            "type": "string"
          },
          "mimeType": {
            "description": "MIME type when you know it.",
            "type": "string"
          },
          "filename": {
            "description": "File name, including the extension when you have one.",
            "type": "string"
          }
        },
        "additionalProperties": false
      }
    },
    "page": {
      "default": "a4",
      "type": "string",
      "enum": [
        "a4",
        "letter",
        "fit"
      ]
    },
    "orientation": {
      "default": "auto",
      "type": "string",
      "enum": [
        "auto",
        "portrait",
        "landscape"
      ]
    },
    "margin": {
      "default": 0,
      "type": "number",
      "minimum": 0,
      "maximum": 144
    }
  },
  "required": [
    "images",
    "page",
    "orientation",
    "margin"
  ],
  "additionalProperties": false
}
```

### Example tools/call

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "images_to_pdf",
    "arguments": {
      "images": [
        {
          "url": "https://example.com/file"
        }
      ],
      "page": "a4",
      "orientation": "auto",
      "margin": 0
    }
  }
}
```

Setup for Claude, Cursor, and VS Code: https://benchline.fabwaseem.com/mcp/guide

## Questions

### Are the images uploaded?

No. JPG and PNG are embedded in this browser. WebP is drawn to a canvas here and then embedded as PNG. Nothing is uploaded.

### What does Fit mean?

Fit makes each page the same shape as its image, with the long edge the length of an A4 page. A4 and Letter put the image on a standard page and center it.

### How does automatic orientation work?

A wide image uses a landscape page. A tall image uses portrait. You can force either one.

### Can I reorder the pages?

Yes. The PDF follows the list from top to bottom. Move a row with the arrows or by dragging it.

## Related tools

- [Merge PDF](https://benchline.fabwaseem.com/t/pdf-merge): Combine PDFs in the browser. Reorder them, keep a page range from each file, and download one document.
- [Split PDF](https://benchline.fabwaseem.com/t/pdf-split): Extract a page range, or split a PDF into single pages or chunks, then download a PDF or a ZIP.
- [Compress PDF](https://benchline.fabwaseem.com/t/pdf-compress): Shrink a PDF in the browser. Pick a preset or a target size and compare the file before and after.
- [QR code generator](https://benchline.fabwaseem.com/t/qr-code-generator): Make a static QR code for text, a URL, Wi-Fi, or a vCard. Set the colors and error correction, then download SVG or PNG.
