Insert a blank PDF page at any position
Insert a blank page into an existing PDF without rebuilding the document by hand.
Run — free
Runs in your browser. Free, unlimited — your data never leaves this page.
Provide the PDF and a one-based position, and the tool places a clean page there using the same dimensions as the page at that location. To add a page at the end, use the position immediately after the current last page. The operation is deterministic, keeps the original page order, and clearly rejects positions that do not exist.
Choose the exact insertion position
Positions are one-based because they describe where the new page will appear to a person reading the finished document. Position 1 inserts a blank page before the current first page. Position 2 places it between the current first and second pages. For a document with five pages, position 6 appends a blank page after page five. Those are the only valid positions: the lowest is 1 and the highest is the existing page count plus one. This explicit rule prevents an ambiguous request from silently producing a document with the page in the wrong place. If the position is zero, negative, fractional, or larger than the append position, the request returns an invalid-input error and leaves the source unchanged. Before automating a workflow, count the source pages and calculate the position from the document state you actually submit. That matters when an earlier step can add, remove, or split pages. The result reports the inserted position and new total, making it straightforward to verify the transformation before storing or forwarding the PDF.
How the blank page gets its size
The inserted page uses the effective media box of the page currently at the requested position. That means inserting before a portrait letter page creates a portrait letter blank, while inserting before a landscape or custom-size page preserves those dimensions. When the requested position appends to the document, there is no following page to inspect, so the new page copies the size of the existing last page. This behavior is particularly useful in mixed-size PDFs such as scanned records, presentation handouts, architectural packets, and combined reports. The page is intentionally blank: it has an empty resource dictionary and no content stream, annotations, form fields, or copied marks. Only the page geometry is carried over. The response also includes the computed width and height in PDF points, so a caller can confirm which dimensions were selected. A PDF point is one seventy-second of an inch. The source pages retain their order and content; the operation changes the page tree only as needed to introduce the new blank page.
Prepare compatible input and verify the result
Supply a classic PDF either as plain PDF text or as a PDF base64 data URI. The current beta implementation deliberately rejects cross-reference-stream documents instead of guessing at structures it cannot safely reconstruct. This boundary keeps the algorithm deterministic and makes failures visible. The parser reads the catalog and page tree, follows nested page nodes, resolves inherited media boxes, inserts a new page reference into the correct parent, updates every affected page count, and rebuilds a valid classic cross-reference table. No network request, clock, random value, storage service, or model is involved. After processing, check the returned page count, insertion position, width, and height, then save or pass along the returned PDF. For production automation, test representative source files first, especially documents generated by unusual publishing software. If a file is rejected as an unsupported cross-reference stream, convert it to a classic PDF with a trusted PDF utility before retrying. Each API request costs $0.002; the same deterministic operation can also power an interactive browser workflow.
What you can do with it
Add a separator sheet
Insert a clean page between sections of a combined report so printed copies can be divided or annotated.
Restore duplex alignment
Add a blank page where needed so a chapter or form begins on the intended front side during double-sided printing.
Create room for signatures or notes
Place a same-size blank page beside supporting material without recreating or resizing the original PDF.
FAQ
What positions are valid?
Use an integer from 1 through the current page count plus one. The final value appends the blank page.
Which page size is used?
The blank copies the effective media box of the page at the insertion position, or the last existing page when appending.
Does the new page contain anything?
No. It has the selected dimensions but no content stream, annotations, form fields, or copied graphics.
What happens when the position is out of range?
The request returns an invalid-input error and does not produce a modified PDF.
What does the API request cost?
Each request costs $0.002.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/pdf/insert-blank-page \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"pdf":"https://ejemplo.com/documento.pdf","position":2}'const res = await fetch("https://api.kit.forhosting.com/pdf/insert-blank-page", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"pdf": "https://ejemplo.com/documento.pdf",
"position": 2
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/pdf/insert-blank-page",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"pdf": "https://ejemplo.com/documento.pdf",
"position": 2
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/pdf/insert-blank-page", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"pdf":"https://ejemplo.com/documento.pdf","position":2}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"pdf":"https://ejemplo.com/documento.pdf","position":2}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/pdf/insert-blank-page", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"pdf": "https://ejemplo.com/documento.pdf",
"position": 2
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "pdf.insert_blank_page",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 25 |
max_pages | 200 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |