Processed on-device · pdf.js + pdf-lib

Resize PDF Online — change page dimensions without distorting the content

Pick a standard preset or type a custom size, choose how content scales into it, add margins, and apply it to all pages, a range, or pages you select yourself.

See the four steps
Presets or custom size 4 scaling modes Click-to-select pages Nothing leaves your device
Built & maintained by Bhavin J. Sheth | Updated

The resize console

Upload a PDF, choose the new size and scaling rule, then apply it.

Drop your PDF here

or browse files

How resizing actually works

Resizing is two decisions, not one

What new size the page becomes, and what happens to the content that was already on it — those are genuinely separate settings, and mixing them up is where most bad results come from.

A new canvas, then a placement rule

A Letter-size report that needs to go out as A4 for European colleagues, an architectural drawing that needs shrinking from A1 to A3 for a portfolio, an e-book that needs reformatting to fit a smaller tablet screen — each of these needs a specific new page size, but they don't all want their content handled the same way once that size changes.

pdf-lib creates a new blank page at your chosen dimensions, then places the original page's content into it according to the scaling mode you pick — stretched to fit it exactly, scaled down to fit inside it, scaled up to fill and crop it, or left at its original size and centered. Margins carve out a border the content won't be placed into.

Every control and what it changes

Presets or custom size

Five standard paper sizes plus a square preset, or type exact dimensions in mm, cm, inches, or points.

Lock aspect ratio

Changing width recalculates height automatically, so custom sizes don't come out stretched by accident.

Four scaling modes

Fit, Stretch, Keep Original Size, and Crop — each places existing content into the new page differently.

Margins

Reserve space on any side that content won't be scaled or centered into.

Three page-selection modes

All pages, a typed range, or click individual thumbnails to build your own list.

Scaling mode decides more than the dimensions do

The size you pick is only half the outcome — the scaling rule decides what happens to the content inside it.

1

Upload your PDF

Drag it onto the upload area, or click Select PDF. A thumbnail of every page appears right away.

Choose "Manually select pages" to click individual thumbnails later.
2

Define the new page size

Use the control panel to set your new dimensions:

Preset sizes: pick a standard size like A4 or Letter.
Custom size: type exact width and height in mm, in, pt, or cm.
Scaling & margins: decide how content fits and where the border goes.
3

Apply and download

Click Resize PDF. Rename the output file if you like, then download the finished document.

All processing happens in this tab — nothing is uploaded.
4

Check the result

Open the downloaded file to confirm the size and scaling look right before sharing it further.

5 presets + square Custom dimensions

From one page size to another, cleanly

A Letter document resized to A4 with Fit to Page scaling.

Original Original
Original PDF page in Letter size before resizing

An 8.5 × 11 inch page, needing to become A4 for international distribution.

Resized
Resized A4
PDF page resized to A4 with content scaled to fit

With Fit to Page, the content is scaled proportionally into the new dimensions without stretching or cropping.

Situations where the page size itself is the problem

Cases where the document's dimensions, not its content, are what need to change.

Common situations for resizing a PDF, by user type
Use caseWhat resizing solvesTypical user
International distributionConvert US Letter documents to A4 for colleagues or clients outside North America.Business teams
Booklet preparationResize pages down to A5 or similar for printed booklets and pamphlets.Publishers & print shops
Technical drawingsScale a large-format architectural or engineering plan down to a portfolio-friendly size.Architects & engineers
Submission requirementsMatch a journal, university, or client's specified page dimensions before submission.Students & researchers
Screen-sized PDFsResize fixed-layout PDFs to dimensions that better match a tablet or other screen-based reading workflow.Readers
Print margins & page dimensionsAdjust page dimensions or add margin space when preparing a PDF for a print workflow.Designers
Portrait or landscape page sizesChange a PDF page to portrait or landscape dimensions while choosing how the existing content is fitted into the new page.Office administrators
Sheet music & scoresResize pages to fit a smaller music stand or tablet display.Musicians
Scaling modes explained

Four scaling modes, four different outcomes

Same new page size, four very different results depending on how existing content is placed into it.

Fit to page (default)

Scales the content down or up so the whole page fits inside the new dimensions, preserving its proportions. May leave empty space on two sides if the aspect ratios don't match. A good default when you want to preserve the full page without stretching or cropping.

Stretch to fit

Stretches width and height independently to fill the new page exactly, with no empty space. If the aspect ratio changes, content will look visibly stretched or squashed — only use this when the target size shares the same proportions.

Keep original size (centered)

Content stays at its original dimensions and is centered on the new page. If the new page is smaller than the content, parts of it will be cut off at the edges — right for adding a border around content that must stay exactly as-is.

Crop to fit

Scales content up until it fully covers the new page, cropping whatever overflows the edges. No empty space, but parts of the original content are permanently trimmed away — best when filling the frame matters more than preserving every element.

When the resized file doesn't come out right

What's actually happening, and the fastest way through it.

Symptom
Why it happens
Fix

Content looks stretched or squashed

Stretch to Fit was used with a target size that has different proportions than the original.

Switch to Fit to Page, which preserves proportions, or enable Lock Aspect Ratio when entering a custom size.

Part of the content is missing

Crop to Fit was used, and content near the edges was trimmed to fill the new page fully.

Switch to Fit to Page instead — nothing is cropped, though empty space may appear on two sides.

Clicking the Square preset shows an odd point value

The Square preset fills the custom-size fields directly in points, so 1000 × 1000 is what should appear.

Confirm the unit dropdown shows "pt" — if you'd rather work in mm or inches, switch units and the value converts automatically.

Clicking pages doesn't do anything

Page thumbnails only register selections when Apply to Pages is set to "Manually select pages."

Choose "Manually select pages" first, then click thumbnails to add or remove them from the list.

A password-protected PDF won't load

Encrypted files can't be read by the in-browser rendering engine.

Remove the password with a PDF unlock tool first, then upload the unlocked copy.

Resize button does nothing

No PDF has been uploaded yet.

Upload a PDF first — the Resize button becomes active once pages have loaded.

Content looks stretched

Why: Stretch to Fit with mismatched proportions.

Fix: Use Fit to Page or lock the aspect ratio.

Content is missing

Why: Crop to Fit trimmed the edges.

Fix: Use Fit to Page instead.

Odd Square preset value

Why: Confirm unit is pt.

Fix: Switch units to convert automatically.

Page clicks do nothing

Why: Not in Manual mode.

Fix: Select "Manually select pages" first.

Password-protected PDF won't load

Why: Encrypted files can't decode in-browser.

Fix: Unlock it first, then upload.

Resize button does nothing

Why: No PDF uploaded.

Fix: Upload a PDF first.

Getting the right size on the first try

A working order that avoids the most common redo.

Lock the aspect ratio for custom sizes

Unless you specifically want to stretch content, check Lock Aspect Ratio so width and height stay proportional.

Start with Fit to Page

It's the default for a reason — it scales content proportionally without cropping or stretching anything.

Use Manually Select for scattered pages

When the pages you need aren't a clean range, switch to Manually Select and click through the thumbnails.

Check the unit before typing dimensions

A width of "1000" means something very different in points versus mm — confirm the dropdown before entering numbers.

Keep the original file

Resizing creates a new document — keep the source PDF so you can try a different size or mode later.

Preview the result before sharing

Open the downloaded file and check a few pages before sending it on — resizing is fast to redo if something's off.

PDF resize FAQs

If something's not covered here, the troubleshooting section above likely has it.

Is it safe to upload my documents to resize them?

Yes. The entire resizing process happens locally in your browser — your files are never uploaded to a server.

Will resizing reduce the quality of my PDF?

The original content isn't re-compressed — the existing page is scaled to fit the new dimensions. Vector content stays sharp at any scale; raster images keep their original pixel data, so scaling them up can make them look softer, the same way enlarging any image would.

Can I apply different sizes to different pages?

One resize setting applies to a selection of pages at a time. To use different sizes for different pages, run the tool more than once — resize pages 1-10 to A4, download, then re-upload and resize pages 11-20 to A5.

What's the difference between the page selection modes?

All Pages applies the new size everywhere. Page Range applies it to the numbers or ranges you type in, like 1-3, 7. Manually Select Pages lets you click individual page thumbnails to build a custom list, useful when the pages you want aren't a clean range.

Can I undo a resize after downloading the file?

No — the downloaded file is a new, separate PDF. To undo, re-upload your original, unresized file and start over. Keep a copy of the original if you might want to try a different size later.

What happens to my file after I'm done?

Nothing — it was never uploaded. The resized PDF is generated in your browser and downloaded as a new file; the original stays untouched.

Build notes

How this PDF resizer was built

See how the browser-based PDF resizer handles page dimensions, scaling modes, unit conversion, and page selection without sending the document to a server.

Published on freeCodeCamp

How to Build a Browser-Based PDF Resizer Using JavaScript

Covers page-dimension math, unit conversion, standard paper formats, and client-side PDF manipulation with pdf-lib.

Read the write-up on freeCodeCamp

Written by Bhavin Sheth · Founder, AllInOneTools