The fastest way to add a border in Photoshop

Open your image in Photoshop, then go to Image > Canvas Size. Increase both the width and height by the same amount — if you want a 20-pixel border, add 40 pixels total to each dimension (20 on each side). Make sure the image preview shows your photo centered in the new canvas space, then click OK. The empty space around your image becomes your border, and you can fill it with any color you want by selecting that color first, then going to Edit > Fill and choosing Foreground Color or Background Color.

This method works because you are literally expanding the canvas — the workspace Photoshop draws on — rather than drawing a line on top of your image. The border sits behind your photo, so it never covers any part of what you actually want to show.

Key Takeaways

  • Canvas Size is the simplest route: expand the canvas, center your image, and fill the new space with color.
  • Stroke adds a colored outline directly on your image edge and works best on a separate layer so you can adjust it without affecting the original photo.
  • The border thickness you enter in Canvas Size is the total width, so divide by two to get the border size on each side.
  • You can create textured or patterned borders by filling the canvas space with a pattern or gradient instead of a solid color.

Using Stroke for a border that sits on the image edge

If you want the border to sit right on the edge of your photo rather than around it, use the Stroke command. First, make sure your image layer is selected in the Layers panel on the right. Go to Edit > Stroke. A dialog box opens where you choose the width (in pixels), the color, and the position — choose Inside so the stroke does not expand your canvas.

Stroke works by drawing a line along the edge of whatever is currently selected. If you have not made a selection, Photoshop strokes the entire layer edge. For a cleaner result, create a new layer first, place it below your image layer, and apply the stroke to the image layer — this way you can delete and redo the stroke without touching your original photo.

The stroke method gives you a crisp, even border, but it covers a thin strip of your actual image at the edges. Canvas Size is better if you want to preserve every pixel of your photo.

Creating a border with a specific color

Before you expand the canvas or apply a stroke, decide what color you want the border to be. Click the foreground color square (the larger square in the toolbox on the left side of your screen) to open the color picker. Choose your color, then click OK.

If you used Canvas Size, that foreground color is what you will fill the border space with when you go to Edit > Fill. If you used Stroke, the color picker opens as part of the Stroke dialog, so you can choose the color right there without switching back and forth.

For a white or black border — the most common choices — you can also just click the small curved arrow icon between the foreground and background color squares to swap them, or press D on your keyboard to reset to black foreground and white background.

Adding a border with a pattern or gradient

Instead of a flat color, you can fill the border space with a pattern or gradient. After you expand your canvas with Canvas Size, go to Edit > Fill. In the dialog that opens, change the dropdown from Foreground Color to Pattern or Gradient. Choose which pattern or gradient you want from the preview that appears, then click OK.

This approach takes a few extra seconds but creates a much more textured or decorative border without any additional tools. You can browse Photoshop's built-in patterns and gradients, or download custom ones from design websites and install them into Photoshop's pattern library.

Adjusting border size after you create it

If you used Canvas Size and the border is too thick or too thin, you have two options. The easiest is to undo (press Ctrl+Z on Windows or Cmd+Z on Mac), then start over with a different size. The second option is to crop the image down — go to Image > Crop Image — but this removes border space permanently and is harder to control precisely.

If you used Stroke and want to change the thickness, undo and apply Stroke again with a different width. Stroke is more forgiving because it does not change your canvas size, so you can experiment without losing image data.

Saving your image with the border

Once your border looks right, flatten the image before saving if you added the border on a separate layer. Go to Image > Flatten Image. This merges all layers into one, which most file formats require anyway.

Then go to File > Export As (or Save As if you want to keep it as a Photoshop file). Choose your format — JPEG for photos, PNG if you need transparency, TIFF for high-quality archival. The border is now part of your final image and will appear in any program that opens the file.

Frequently Asked Questions

Can I add a border to just one side of my image?

Canvas Size expands all sides equally, so it is not the right tool for a one-sided border. Instead, use the Rectangle Select tool to select just the area where you want the border, then go to Edit > Stroke. You have full control over which edges get a border this way.

What if I want a thick border with a specific width in inches instead of pixels?

Go to Image > Canvas Size and change the dropdown next to the width and height fields from pixels to inches. Enter your desired border width, and Photoshop converts it based on your image's resolution. A 0.5-inch border on a 300 DPI image is about 150 pixels.

How do I make a border that fades or has soft edges?

Use Canvas Size to create the border space, but instead of filling it with solid color, create a new layer in that space and use the Gradient tool to fade from your border color to transparent. This creates a soft, feathered edge effect.

Can I add a border to multiple images at once?

Yes, using Photoshop's batch processing. Go to File > Automate > Batch, select your action (you will need to record a border action first), choose your source folder, and let Photoshop apply the same border to every image in that folder.