Add Border to Image Online

Add a solid-color border to images directly in your browser. The tool supports outside or inside placement, equal or separate side widths, custom colors, and a live preview before downloading. It is free to use.

Drop your images here or

Your files remain private and will be processed locally in your browser.

Free to use
No installation required
Secure & private
No daily limits

How to Add a Border to an Image in 3 Easy Steps

Follow these three simple steps to add a border to an image. No software installation required. Free and secure.

  1. Upload images

    Choose an Image

    Select a JPG, JPEG, PNG, WebP, AVIF, or BMP image from your device, or drag and drop it into the browser.

  2. Choose your settings

    Customize the Border

    Place the border outside or inside the image, use the same width on every side or adjust each side separately, and choose a border color.

  3. Download results

    Preview and Download

    Compare the original and result, check the output dimensions, choose PNG, JPG, or WebP, and click “Download Image.”

How Does the CompressFly Image Border Tool Work?

The CompressFly image border tool adds a solid-color border to JPG, JPEG, PNG, WebP, AVIF, and BMP images directly in your browser. Choose Outside Image to expand the canvas around the image, or Inside Image to draw the border over its edges without changing the source pixel dimensions. Use one width for all four sides or set each side separately, select a custom border color, preview the result, and export it as PNG, JPG, or WebP.

Unlike online image editors that require file uploads, no image is sent to a server. Border rendering and export are processed locally in your browser.

What "in your browser" means

  • No image file is uploaded to a server
  • Border rendering and export are processed locally on your device
  • The bordered image is downloaded directly from your browser

Outside Border vs Inside Border

Choose the placement based on whether you want to add space around the image or keep the current pixel dimensions.

Border PlacementOutput DimensionsResult
Outside ImageWidth increases by left + right; height increases by top + bottomAdds the border around the image without covering its content
Inside ImageRemain the same as the source imageDraws the border over the image edges and may cover edge content

A 1000 × 800 image with a 20px outside border on every side becomes 1040 × 840. The same 20px inside border remains 1000 × 800.

Supported Image Formats and Border Controls

Choose the placement, width, color, and output format required for a simple solid-color image border.

Supported Input Images

Add a border to JPG, JPEG, PNG, WebP, AVIF, or BMP images.

Outside or Inside Placement

Expand the canvas around the image or draw the border over its existing edges.

Equal or Separate Side Widths

Apply one pixel width to every side or adjust the top, right, bottom, and left independently.

Custom Border Colors

Add a white, black, or custom-color border with the color picker or a six-digit hexadecimal value.

PNG, JPG, or WebP Output

Choose the output format before downloading the bordered image.

Why Use CompressFly to Add a Border to an Image?

Fast Browser-Based Editing

Add a border directly in your browser without waiting for the image to upload to or download from a server.

Easy to Use

Choose the border placement, width, and color with straightforward controls and no prior editing experience.

Preview Before Downloading

Switch between the original and result, then review the border and output dimensions before downloading.

Multiple Output Formats

Export the bordered image as PNG, JPG, or WebP from the same tool.

Private & Secure

Your image is processed locally in your browser and is not uploaded to a server.

Free Access

Use the image border tool for free without signing up or entering credit card details.

Image Border Tool FAQ

How do I add a border to an image online?

Add a border to an image online in three steps: 1. Select or drag and drop a JPG, JPEG, PNG, WebP, AVIF, or BMP image into the browser. 2. Choose Outside Image or Inside Image, set the width for every side, and select a border color. 3. Review the result and output dimensions, select PNG, JPG, or WebP, and click “Download Image.”

Can I add a white or black border to a photo?

Yes. Choose the white or black color preset, or enter another six-digit hexadecimal color value to create a custom solid border.

What is the difference between an outside and inside border?

An outside border expands the canvas and surrounds the image without covering it. An inside border keeps the source pixel dimensions but is drawn over the image edges, so it may cover content near those edges.

Does adding a border change the image dimensions?

It depends on the placement. Outside Image increases the width by the left and right border values and the height by the top and bottom values. Inside Image keeps the source pixel dimensions.

Can I set a different border width on each side?

Yes. Turn off “Same on all sides,” then enter separate pixel widths for the top, right, bottom, and left borders.

Is the image border tool free?

Yes. The image border tool is free to use. No account, credit card, or software installation is required.

Are my images uploaded to a server?

No. CompressFly adds the border directly in your browser, so the image file is processed locally and is not uploaded to a server.