How to Add a Border to a Photo

A border is a small thing that solves a few real problems, including one you've probably run into without naming it.

Illustration of framed photographs leaning against a wall in a warm workroom

Add Border to Image puts a solid frame around your photo. Two controls: width in pixels (1 to 200, defaulting to 20) and a colour picker. That's the whole tool, and it's enough.

The problem it quietly solves

The most useful reason to add a border isn't decoration. It's that a photo with white edges disappears on a white page.

A product shot on a white sweep, a screenshot of a white interface, a document scan — put any of them on a white background and the image has no boundary. The reader can't tell where your picture stops and the page starts. A thin grey border fixes it instantly, and once you've noticed the problem you'll see it everywhere.

Same story for a light-coloured photo in a light-themed document, or a screenshot in a slide deck. It reads as sloppy without anyone being able to say why.

Illustration of a person on a step stool levelling a picture frame on a gallery wall

How thick

The width is in pixels of the output image, which is the thing to keep in mind: it's relative to the photo, not to how big it's displayed. A 20px border on a 400px thumbnail is a bold frame. The same 20px on a 4000px photo is a hairline nobody will see.

So scale it to the image, and think about roughly what fraction of the width you want. As a starting point:

  • A definition line — just enough to separate the image from the page. Thin, on a resized image.
  • A visible frame — deliberate, gallery-ish. Noticeably thicker.
  • Heavy — the border becomes part of the composition. Fine if you mean it, odd if you don't.

Because it's pixel-based, resize before you add the border. Add it first and then resize, and the border shrinks with everything else — a carefully judged frame becomes a faint line. Our resizing guide covers what dimensions to land on first.

What colour

Default is black, which is rarely the best answer. Black borders are heavy and read as harsh against most photos.

  • Mid-grey — the safest choice for definition. Visible against both white and dark backgrounds, opinionated about nothing.
  • White — a matte-print look, but only on a background that isn't white. Otherwise you've added nothing at all.
  • A colour from the photo — pulling a tone out of the image itself looks intentional in a way an arbitrary colour doesn't.
  • Black — genuinely good for bright, high-contrast photos, and for anything going on a dark page.

Your image gets bigger

Worth expecting: the border adds to the canvas rather than eating into the photo. A 20px border on all sides means the output is 40px wider and 40px taller than the input. Nothing is cropped, but if you're working to exact dimensions for an upload, account for it — or set your target size, add the border, then resize back down.

One more thing that catches people: the output is always a PNG, whatever you put in. Feed it a JPG and you'll get a PNG back, which for a photograph is usually a much heavier file — see our guide on why images get big for why that combination is the worst case. If the result needs to stay a JPG, convert it back with PNG to JPG as a final step.

The tool takes a batch too, and applies the same border to each file. That's how you get a set of images that look like a set — useful for a product grid or a portfolio row, though the same caveat applies as with batch watermarking: one setting across mixed sizes won't look identical on every image, since the border is pixel-based.

FAQ

What border width should I use?
It depends on the image's pixel dimensions, since the width is in output pixels. Resize to your final size first, then judge — a 20px border reads completely differently on a 400px image than a 4000px one.

Does the border crop my photo?
No. It's added around the outside, so the output is larger than the input by twice the border width in each dimension.

Why add a border at all?
Most usefully, to stop a light-edged image from bleeding into a light background. It's a definition problem more than a decorative one.

← Back to all guides