Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Add Stroke To Image

Upload an image and add a colored stroke/border around it. Adjust width, color, and position (inside, outside, or center).

Your files never leave your browser
Drop image here or click to upload
Supports JPG, PNG, WebP, GIF, BMP, SVG (max 50 MB)

Stroke Settings

10 px

Stroke Position

Preview

Drop an image, pick a stroke width and color, and download a PNG with a clean border around it. Choose outside to grow the canvas, inside to keep exact dimensions, or center to split the difference. And everything runs in your browser. Nothing gets uploaded.

How It Works

Upload Image
→
Set Stroke Options
→
Download PNG

The browser reads your image into memory, creates a canvas sized for the stroke position you picked, draws the border rectangle first, then composites the original image on top. Outside strokes add extra pixels on every side so the full image stays visible. Inside strokes draw over the edge pixels instead. The final result gets exported as a lossless PNG — no quality loss, no compression artifacts on the stroke color.

Examples

Product Photo for an Online Store

Your white-background product shot blends into the white page layout. A thin border fixes that instantly.

INPUT
800×800 PNG product photo White background, no border
OUTPUT
816×816 PNG with 8px light gray (#D1D5DB) outside stroke

Social Media Profile Picture with Brand Color

You want a colored ring around your headshot to match your brand palette — the kind of thing Instagram story highlights have.

INPUT
400×400 JPEG headshot Brand color: #6366F1
OUTPUT
424×424 PNG with 12px indigo (#6366F1) outside stroke

Screenshot for Documentation with Inside Border

You're writing docs and need screenshots that pop against a white page, but can't change the image dimensions because they have to fit a fixed layout grid.

INPUT
1280×720 PNG screenshot Need fixed dimensions kept
OUTPUT
1280×720 PNG (same size) 2px black inside stroke — subtle but visible on any background

Who Uses This

🎨 Designers

Add framing strokes to mockups and portfolio images before sending them to clients.

🛒 E-commerce Sellers

Put a thin border on product photos so they don't disappear into white marketplace backgrounds.

📝 Technical Writers

Outline screenshots in documentation so readers can tell where the image ends and the page begins.

📱 Social Media Managers

Ring profile pics and story thumbnails with brand colors for a consistent feed look.

Common Mistakes

Setting stroke too thick for small images

A 50px stroke on a 200×200 icon looks like a colored square with a tiny picture in the middle. Keep it proportional — 2-5% of the shortest side is a safe range. For that 200px icon, 4-10px works well.

Using inside stroke on images with important edge detail

Inside strokes paint over the outer pixels of your image. If there is text or a face near the edge, those get clipped. Switch to outside stroke so the canvas grows instead and nothing gets covered.

Picking a stroke color that matches the background

White stroke on a white page defeats the purpose. If you're not sure where the image will end up, go with a medium gray like #9CA3AF — it shows on both light and dark backgrounds.

Technical Details

Frequently Asked Questions

What's the difference between outside, inside, and center stroke?

Outside expands the canvas and draws the border around the original image — no pixels get covered. Inside draws on top of the edge pixels, keeping the exact original dimensions. Center splits the difference: half the stroke width goes outward, half goes inward. Most people want outside unless they need to keep specific pixel dimensions.

Does the stroke change my image's dimensions?

With outside stroke, yes. A 10px outside stroke on a 500×400 image produces a 520×420 result — it adds the stroke width to each side. Inside stroke keeps the same dimensions. Center stroke increases each dimension by the stroke width (half on each side).

Is my image uploaded to a server?

No. The entire process runs locally in your browser using the HTML5 Canvas API. Your file never leaves your device. You can even disconnect from the internet after loading the page and the tool will still work.

Can I add a stroke to a transparent PNG?

Yes. The stroke goes around the rectangular boundary of the image, not around the visible content. So if you have a logo on a transparent background, the stroke will frame the whole rectangle. If you need an outline that traces the shape of the subject, you'd need a more advanced tool that detects edges.

What image formats can I upload?

Anything your browser can render — PNG, JPEG, WebP, GIF, BMP, and SVG all work. The output is always PNG regardless of what you upload, which means you get lossless quality and transparency support on the download.

Share: