🛠️

PDF Page Rotator

Rotate specific pages or all pages by 90, 180, or 270 degrees

POST 10 credits /v1/pdf/rotate
curl -X POST "https://pdf.toolkitapi.io/v1/pdf/rotate" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://toolkitapi.io/document.pdf",
    "angle": 90,
    "pages": "2,4-6"
  }'
import httpx

resp = httpx.post(
    "https://pdf.toolkitapi.io/v1/pdf/rotate",
    json={
    "url": "https://toolkitapi.io/document.pdf",
    "angle": 90,
    "pages": "2,4-6"
  },
)
print(resp.json())
const resp = await fetch("https://pdf.toolkitapi.io/v1/pdf/rotate", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://toolkitapi.io/document.pdf",
    "angle": 90,
    "pages": "2,4-6"
  }),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "pdf": "JVBERi0xLjcKMSAwIG9iago8...",
  "page_count": 10,
  "rotated_pages": 4,
  "angle": 90,
  "file_size": 312450
}

Description

Rotate specific pages or all pages by 90, 180, or 270 degrees

How to Use

1

1. Provide the PDF via `pdf` (base64) or `url` (public URL).

2

2. Set `angle` to `90`, `180`, or `270` (degrees clockwise).

3

3. Optionally set `pages` to rotate only specific pages (e.g. `"2,4-6"`). Omit to rotate all pages.

4

4. The response contains the modified PDF with the rotation applied.

About This Tool

PDF Page Rotator rotates pages in a PDF document by 90, 180, or 270 degrees clockwise. You can rotate all pages at once or target specific pages by number or range, leaving the rest unchanged.

Use this to fix orientation issues — scanned pages that came in sideways, landscape pages that need to be portrait, or mixed-orientation documents that need standardizing. The rotation is permanent and embedded in the output PDF.

Why Use This Tool

Frequently Asked Questions

Can I rotate different pages by different angles?
Not in a single request. Each call applies one angle to the selected pages. To rotate page 1 by 90° and page 3 by 180°, make two sequential requests.
Is the rotation additive?
Yes. If a page already has a 90° rotation and you rotate it another 90°, the result is 180°. Rotations are applied on top of any existing page rotation.
Does rotation change the page dimensions?
The page content is rotated within the existing page box. A 90° rotation effectively swaps the visual width and height, but the underlying mediabox dimensions in the PDF may or may not change depending on the viewer.

Start using PDF Page Rotator now

Get your free API key and make your first request in under a minute.