Skip to content

Add border to image

Add a border, round the corners, or make photos square without cropping.

Drop images here

JPG, PNG, WebP, AVIF, HEIC, SVG and GIF

How to use Add border to image

  1. Upload your images. Drop one or more JPG, PNG, WebP, AVIF, HEIC, SVG, or GIF files onto the page.
  2. Set Border width and Unit. Enter a thickness value using % of image (up to 50) or pixels (up to 2000), and pick a Color.
  3. Adjust shape options. Drag Rounded corners between 0% and 50%, or tick Make it square to pad the short side for Instagram.
  4. Export your framed files. Click Add border to download a single -border image or a ZIP archive for batch jobs.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

How do I post a full photo on Instagram without cropping?

Tick Make it square to extend the shorter side of your portrait or landscape photo with solid padding matching your chosen border color. The longer side keeps its full framing while the output becomes an exact 1:1 square.

Padding rectangular photos into 1:1 squares

Social feeds frequently trim tall 4:5 portraits or wide 16:9 landscapes to fit square grid thumbnails. Adding symmetrical padding around the shorter axis preserves every edge of your composition without stretching pixels.

You can preview the square aspect ratio live inside the options panel before clicking Add border. If you need exact marketplace or feed dimensions afterward, you can adjust final pixel dimensions before uploading locally.

Choosing percentage versus pixel border widths

Under Border width, the “% of image” mode scales the margin between 0% and 50% of the shorter image edge. That keeps a 4% gallery mat visually consistent whether a photo is 1,200 px wide or 3,600 px wide.

Switching the Unit menu to pixels lets you specify an exact border thickness from 0 px to 2,000 px. Under the W3C CSS Color Module Level 4 sRGB hex model, the Color picker applies any 24-bit #RRGGBB shade uniformly across all four edges.

Consistent margin ratios also help when preparing digital lookbooks, portfolio thumbnails, or marketplace product catalogs. You can switch between percentage and pixel units at any time while watching the live border preview update immediately.

Rounding image corners and preserving transparent PNG stickers

Curved corners soften profile avatars, product cards, and UI screenshots, but they require careful path clipping so sharp photo corners never bleed through. Transparent graphics also need special handling so the border does not flood empty regions inside the artwork.

Outer corner masking and automatic PNG export

Dragging the Rounded corners slider from 0% up to 50% curves the outer frame using the MDN Web Docs CanvasRenderingContext2D.roundRect() API. The inner photo slot uses a reduced radius (outerR - borderMargin) so 90-degree corners never poke past the curved frame.

At 0% rounding, the tool preserves your original JPG, PNG, or WebP format. As soon as rounding rises above 0%, output switches to PNG automatically so outer corners stay genuinely transparent; for pure circular cutouts, use our circular avatar cropping tool.

Even-odd frame filling for transparent interiors

When framing a transparent PNG icon or sticker, filling the entire background canvas with white would erase its transparent interior. Instead, the renderer traces both the outer rounded rectangle and the inner image slot, then fills the ring using the evenodd winding rule.

That hollow-frame technique keeps transparent backgrounds inside your artwork completely untouched. Only the outer border band receives the selected Color.

Border sizing, format output, and canvas limits reference

Understanding how rounding, units, and browser canvas ceilings interact prevents unexpected file format changes or downscaling on high-megapixel shots. Check these exact code thresholds before exporting large batches.

Setting or input Allowed range Output format behavior Canvas limit behavior
Border width (% of image) 0 to 50 (default 4) Keeps original format at 0% radius Clamped at 4,096 px max side
Border width (pixels) 0 to 2,000 px Keeps original format at 0% radius Scaled down if total exceeds 16,777,216 pixels
Rounded corners 0% to 50% (default 0%) Forces image/png when > 0% Outer and inner arcs clipped cleanly
Make it square Checked or unchecked Pads shorter side with border color Square side equals max(w, h) + 2 * border
Lossy encode quality Fixed 0.92 Applies to JPG and WebP outputs PNG remains lossless

Because the W3C Portable Network Graphics (PNG) Specification Third Edition supports an 8-bit alpha channel, rounded corners blend cleanly against dark or light website backgrounds. Once framed, you can place captions inside your newly padded border without covering the photo itself.

Batch framing multiple photos into a single ZIP archive

Applying matching gallery borders across an entire photo set one file at a time is tedious in desktop editors. Dropping multiple images onto this tool applies your exact border width, color, rounding, and square padding across the whole batch.

Applying uniform percentage frames across mixed resolutions

When a folder mixes horizontal DSLR shots with vertical phone photos, “% of image” mode adapts the pixel border proportionally to each file’s shorter side. Every image in the batch receives a visually balanced frame without manual math.

Because all pixel compositing runs inside your browser tab, zero files are uploaded to remote servers. Even large multi-photo galleries finish locally without waiting in cloud processing queues or hitting daily export limits.

Tip: Set Border width to 0 and tick Make it square when you only want white or black letterbox bars on the short sides of Instagram photos without adding extra margin to the long sides.

If you want a unified monochrome look across your framed gallery, convert the batch with Black and white image before or after adding borders.

Exporting local ZIP archives without quality loss

Each image is decoded via createImageBitmap, drawn onto an offscreen HTML5 Canvas, and released from memory immediately after encoding. Single-file jobs download as <name>-border.<ext>, while multi-file batches pack every output into one ZIP file with zero server uploads.

Questions

Why does adding rounded corners change my JPG to a PNG?

JPG files do not support an alpha transparency channel, so curved outer corners would turn solid black or white. Whenever Rounded corners is set above 0%, the tool switches output encoding to PNG so the outer corners stay see-through.

What is the difference between percentage and pixel border widths?

Percentage mode calculates border thickness from the shorter side of each photo, keeping frames proportional across mixed camera resolutions. Pixel mode adds an exact fixed pixel margin up to 2,000 px on every side regardless of image dimensions.

Can I add borders to transparent PNG stickers without filling the inside?

Yes. The renderer draws the colored frame using an even-odd path rule between the outer canvas and the inner image rectangle. Transparent areas inside your sticker remain see-through instead of getting filled with the border color.

How are multiple framed images downloaded?

When you add a single photo, the browser saves one file ending in -border directly to your device. When you process two or more images together, all framed outputs are bundled into a single local ZIP archive.

Does adding a border reduce image sharpness?

No, as long as the combined canvas stays within 4,096 pixels per side and 16,777,216 total pixels. Images are drawn with high-quality smoothing and encoded at 0.92 quality for lossy formats or losslessly for PNG.

What happens if a bordered photo exceeds 4,096 pixels on one side?

WebKit and Safari enforce a 4,096 by 4,096 pixel canvas ceiling on 2D canvases. If your photo plus its border exceeds that limit, the tool scales the canvas proportionally to fit safely inside 4,096 px without crashing browser memory.

Updated