# PDF ↔ Image Converter > Turn PDF pages into PNG or JPG images, or combine images into a PDF without quality loss. Renders the pages of a PDF as PNG or JPG at 72–300 DPI (one image, or a ZIP for several pages) with a preview of the first page. In the other direction it packs JPG, PNG, TIFF, GIF or WebP images into one PDF; JPG and PNG are embedded losslessly with img2pdf, and you choose page size, fit and order. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://pdfimageconverter.usefulweb.site/ (interactive tool at https://pdfimageconverter.usefulweb.site/tool) - JSON API: POST https://pdfimageconverter.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://pdfimageconverter.usefulweb.site/api/v1/tool) - OpenAPI: https://pdfimageconverter.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://pdfimageconverter.usefulweb.site/mcp - tool `pdf_image_converter` ## Inputs - direction (select): Conversion - file (file, required): PDF or image - Max 100 MB in total. Processed on our server and deleted; results can be downloaded for about 2 hours. - file2 (file): Image 2 (images to PDF) - Optional additional image. - file3 (file): Image 3 (images to PDF) - Optional additional image. - file4 (file): Image 4 (images to PDF) - Optional additional image. - file5 (file): Image 5 (images to PDF) - Optional additional image. - zip (file): ZIP with more images (images to PDF) - Optional: up to 25 images in total, added after the single files in file-name order. - format (select): Image format (PDF to images) - dpi (integer): Resolution (PDF to images) - 72 = screen size, 150 = good for reading, 300 = print quality. - pages (text): Pages (PDF to images) - Page numbers start at 1. Examples: "1-3,5,8-end", "odd", "even", "reverse", "10-1" (descending), "1-9:odd". Leave empty for all pages. At most 100 pages per run. - jpegQuality (integer): JPG quality - pageSize (select): Page size (images to PDF) - fit (select): Fit on the page (images to PDF) - margin (number): Margin (images to PDF, fixed page sizes) - 72 pt = 1 inch = 25.4 mm. - order (text): Image order - Numbers of the images in the order to use, e.g. "2,1,3". Empty = upload order. - password (text): PDF password (only if the file is protected) - Used only to open the file for this conversion; it is written to a private temporary file, never to a command line, and deleted with the job. ## Method - PDF → images: the PDF is validated (qpdf), decrypted with your password if needed, and each selected page is rendered by Poppler (pdftoppm) at the chosen resolution with anti-aliasing. Several pages are delivered as a ZIP; one page as a single image. - Pixel size = page size in points × DPI ÷ 72 (an A4 page at 150 DPI is 1240 × 1754 px). Pages that would exceed 60 megapixels are refused. - Images → PDF: img2pdf embeds JPEG files byte for byte and PNG data without re-compression (lossless). TIFF, GIF and WebP are first converted to PNG by ImageMagick (lossless, first frame only). Transparency is kept as a soft mask. - "Same as the image" makes each page exactly as large as the image at its stored DPI (96 DPI if none is stored). Fixed page sizes place each image according to the fit option and margin. - File types are detected from the content, not the file name. Outputs are deterministic: dates are not written into the PDF.