Skip to main content
OS Authority

Add a border to an image

Pad a picture with an outside border in your chosen color or leave the padding transparent. The image is not intentionally resized: its canvas grows around it.

Your image stays on your device. Preview generation and PNG creation run in this browser without uploading the image or its name.

How it works

  1. Choose one JPG, PNG, WebP or HEIC/HEIF still image. Animated images are not supported.
  2. Enter a whole border width in pixels. Choose a solid color or transparent padding.
  3. Check the scaled preview and final pixel dimensions. Large expanded canvases may exceed your device limits.
  4. Add the border and download the PNG.

Border width and output size

The border is added on all four sides. Output width = source width + twice the border width; output height follows the same formula. For example, a 1200 × 800 image with a 20-pixel border becomes 1240 × 840. A zero-width border adds no padding but still decodes and re-encodes the image as PNG.

Keep source transparency

Only the padding is painted with your selected color. Transparent regions inside the source image remain transparent instead of being filled with the border color. Select transparent padding to leave the outer canvas transparent too. PNG can keep this alpha channel; JPG cannot.

A border is different from resizing

This tool places the oriented decoded image at a whole-pixel offset with no intentional scaling or cropping. Use Resize Image when you need a smaller width or height. Adding a border increases the total dimensions and may not meet an upload limit that requires an exact image size.

Preview, metadata and device limits

The preview is scaled for display; output uses the oriented source dimensions. Browser decoding and PNG encoding may change color profiles, and original metadata is not retained. The tool does not edit DPI metadata or guarantee identical compressed image bytes. Input bytes, image sides, decoded and aggregate pixels, a conservative PNG storage estimate and actual encoded output bytes are bounded. Reduce the image dimensions or border width if the device limit is reached.

Worked examples

Outside border size examples
Source width (px)Source height (px)Border (px)Output width (px)Output height (px)
1,200800201,240840
60060010620620
1,9201,08001,9201,080

Frequently asked questions

Does this crop or stretch the photo?

No intentional cropping or stretching is applied. Padding expands the canvas around the oriented source image.

Can I add white, black or transparent borders?

Yes. Choose a solid color with the color control, or select transparent padding. All four sides use the same whole-pixel width.

Why are the downloaded dimensions larger?

An outside border adds twice its width to both the source width and source height. Check the displayed final dimensions before downloading.

Are HEIC photos and transparent PNGs supported?

Still HEIC/HEIF images are decoded locally. PNG source transparency is retained in the PNG output. Animated images, SVG and video are not supported.

Are my photos uploaded?

No. Preview generation and border processing run locally in a browser worker. The tool does not upload your images.

Last reviewed: October 18, 2026

Related tools