Add padding to an image — a coloured or transparent margin, or pad to a square

Choose an image, a margin size and a colour, and the tool adds that space evenly on all four sides; tick one box to also make the result square without cutting anything off.

Live demo · real result from this tool

Drop images here

or paste with Ctrl+V · nothing is uploaded

Padding in

Your result appears here — processed on your device.

Processed on your device — nothing is uploaded.

How to use Image Padding

  1. Choose one or more images.
  2. Pick Padding in: Pixels or % of width.
  3. Enter the Padding amount. The default is 40.
  4. Pick a Colour (white by default), or tick Transparent padding.
  5. Tick Pad to a square if the result must be square.
  6. Choose Save as and Quality, then press Apply.

What it does and when to use it

Padding gives a picture breathing room. Common jobs:

  • Marketplace and shop listings that want square product photos on white, without cropping off part of the product.
  • Social posts where a wide or tall photo must fit a square frame whole.
  • Logos and icons that need clear space around them before being placed on a coloured background.
  • Prints and documents that need a white margin around the picture.

To reshape a photo by cutting instead, use the image cropper. For a decorative frame, use Image Border. To then make the padded image a set size, run it through the image resizer.

How it works

  1. The margin size is worked out once. In pixel mode it is your number. In percent mode it is image width × percent ÷ 100, rounded.
  2. A new canvas is made, larger by twice the margin in each direction, filled with your colour or with transparency.
  3. The original is placed in the middle, pixel for pixel. Nothing is resized or resampled.
  4. If Pad to a square is ticked and the result is not square, extra space is added to the shorter dimension, split evenly between its two ends.

The image is processed in a background worker in your browser. It is not uploaded.

Worked examples

These sizes follow the steps above.

  • A 1000 × 750 photo with the default 40 px white margin. The result is 1080 × 830 px.
  • The same photo, Padding 0, Pad to a square. The result is 1000 × 1000 px, with 125 px of colour above and 125 px below. Nothing is cropped.
  • The same photo, 5% of width. 5% of 1000 is 50 px on every side, giving 1100 × 850 px.
  • 40 px plus Pad to a square. First 1080 × 830, then 125 px are added above and below to reach 1080 × 1080 px.

Limits and tips

  • The same margin goes on all four sides. For an uneven margin, pad and then crop.
  • When padding a product photo, match the colour to its background so the join is invisible. The image colour picker gives the exact code.
  • Large margins on big images make large files; JPEG keeps the size down if you do not need transparency.

Frequently asked questions

How do I make a photo square without cropping it?
Set Padding to 0 and tick Pad to a square. The shorter side is padded equally on both ends until it matches the longer side, so the whole photo stays visible.
Is padding the same as a border?
The result can look similar, but padding is plain space in one colour that you can make transparent. Image Border adds styled frames, such as double lines or rounded frames.
Does the percentage apply to the height too?
The percentage is always of the image width, and the same number of pixels is added on all four sides. On a portrait photo that gives an even margin, not a taller top and bottom.
Why is my transparent padding white?
It was saved as JPEG, which cannot store transparency. Choose PNG, WebP or AVIF under Save as.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close