Why adding a border to a photo changes its image size

Contents
People often add a white border around a photo to get a film-camera look, or to add a frame to an image before posting it on Instagram. But it's common to notice only later that the actual size of the original photo (in pixels) has changed. Here's why that happens, and how to work out in advance how much bigger the image will get.
Summary ① When you add a border, the final image grows by (thickness × 2) px in both width and height, making it larger than the original. ② For non-square photos, the same number of pixels is added to width and height, so the original ratio shifts slightly. ③ The output file is usually saved as PNG, so even if the original was a JPG, both the file format and the file size change.
Why your photo size changed after adding a border
There are two ways to add a border (frame) to an image. One is to draw the border on top of the photo, inside its edges. The other is to expand the canvas outward around the photo by the border thickness.
Most tools people use for that Instagram look or a framed-print feel use the second method. The original photo's pixels stay untouched, and new padding in the color you choose is added around them. That's why the final width and height in pixels are larger than the original.
The amount it grows is simple. The border is added on all four sides — top, bottom, left, and right — so width gains twice the thickness (left + right) and height gains twice the thickness (top + bottom).
How to calculate how much bigger it gets
The formula is:
- Final width = original width + (thickness × 2)
- Final height = original height + (thickness × 2)
If the photo is square, the ratio stays the same
A 1000×1000 px square photo with a 50 px border becomes 1100×1100 px. The same 100 px was added to both width and height, so the ratio (1:1) stays the same.
If the photo isn't square, the ratio shifts slightly
The tricky case is a photo that isn't square. A 1200×800 px photo (ratio 1.5) with the same 50 px border becomes 1300×900 px.
Recalculate the ratio: 1300 ÷ 900 ≈ 1.444, slightly smaller than the original 1.5. The absolute number of pixels added to both sides is the same (100 px), but the shorter side (800 px) grew by a larger proportion.
You can test this yourself with the canvas resize feature in editing programs like Paint or Photoshop. Enlarge the canvas by the amount you want, set the anchor point to the center, and fill the new padding with the color you want — you'll get the same result. The catch is that every time you change the thickness, you have to recalculate the size and fill it by hand, which gets tedious.
Check it with our tool. If you'd rather drag a slider to set the thickness and see the final size update in a live preview, just upload your photo and it handles the calculation and the fill in one step.
Free · No sign-up · Runs entirely in your browser (nothing is uploaded)

Common sticking points
If you already know the final size you want, you can work backward with the same formula to figure out how big the original needs to be.
| Final size you want | Border thickness | Original size to prepare |
|---|---|---|
| 1080×1080 px | 40 px | 1000×1000 px |
| 1200×1200 px | 100 px | 1000×1000 px |
| 1080×1350 px | 40 px | 1000×1270 px |
Apply original size = final size − (thickness × 2) to width and height separately. If you're targeting a place with a fixed upload size, crop the photo down to smaller than the target size first, then add the border, and the result will match exactly.
The short version
- Most border tools expand the canvas outward around the photo, so after adding a border the width and height each grow by twice the thickness.
- Square photos keep their ratio, but for any other ratio, adding the same amount to width and height shifts the relative proportions slightly.
- If you've decided the final size in advance, use "final size − thickness × 2" to work out how big the original needs to be.
- The output is often saved as PNG regardless of the original format, so both the file size and the extension change.
Free · No sign-up · Runs entirely in your browser (nothing is uploaded)
Frequently asked questions
If the photo is square, does the ratio really stay exactly the same?
Yes. Since the width and height are equal, adding the same thickness to both sides adds the same absolute amount, so the ratio (1:1) stays the same. The ratio only gets distorted with photos whose width and height differ.
Does adding a border reduce the image quality of the original photo?
No. The original photo's pixels are simply moved onto the canvas as they are, and only new padding is filled in around them. The content inside the original isn't recompressed or scaled down. That said, because the output is saved as PNG, the overall file size can end up larger than the original.
Can I use a different thickness on each side?
It depends on the tool. Most tools apply the same thickness to all four sides at once, and in that case you can use the same formula on the assumption that all four sides match. If you need a different thickness per side, you'll have to enlarge the canvas asymmetrically in a separate editing program.
I already cropped the photo to a square, but the result isn't square
The crop may not have been exactly square — off by as little as 1 px. Type the width and height values directly into the crop tool and check first that the two numbers are exactly the same.
This article was adapted from our Korean original. Read the Korean original