Add Stroke To PNG
Upload a PNG with transparency and add a colored stroke around the non-transparent content. Automatically detects edges.
Stroke Width
Stroke Color
Preview
Outline any transparent PNG by picking a color and width — the stroke follows your actual shape, not a rectangle around it. The canvas expands on all four sides so nothing gets clipped, and your original pixels stay untouched at the center. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool scans every pixel’s alpha value. When it finds a non-transparent pixel sitting next to a transparent one, that’s an edge. It then paints your chosen color outward from each edge pixel, expanding the canvas by the stroke width on all four sides so the outline is never cut off. The original image stays centered and untouched — only the new stroke pixels are added around it.
Examples
White Logo for a Dark Background Presentation
You have an all-white company logo PNG and need it readable on both light and dark slides.
White logo PNG (512×512)
Transparent background
No visible outline
Same logo with 4px black stroke
Canvas: 520×520
Logo pops on any background
Game Asset — Character Sprite Outline
2D game sprites often need a bold outline so they stand out against busy level backgrounds. Most sprite sheets ship without one.
Character sprite (128×128)
Transparent BG, no outline
Blends into grass tiles
Same sprite + 2px #1a1a1a stroke
Canvas: 132×132
Crisp outline on every edge
Sticker-Style Product Icon for an E-Commerce Listing
Marketplace listings with a sticker-style cutout look get higher click-through rates. A thick colored outline on a product cutout PNG does the trick without Photoshop.
Product cutout PNG (800×600)
Background removed
Clean edges, no border
Product + 6px #ff6600 stroke
Sticker-style look
Ready to drop on any listing
Who Uses This
Add outlines to sprites and UI icons so they read clearly against any level background.
Create sticker-style cutouts for social posts and packaging mockups in seconds.
Make product cutout images pop on white marketplace backgrounds with a bold outline.
Outline logos and overlay PNGs for YouTube thumbnails and stream layouts.
Common Mistakes
JPEGs don’t have an alpha channel, so every pixel counts as “content.” You’ll get a rectangle border instead of a shape-hugging stroke. Convert to PNG with transparency first, or use a background-removal tool before this one.
A 20px stroke on a 64×64 icon overwhelms the actual content. Keep stroke width under 10% of the image’s shortest side for a clean look — so around 3–5px for small icons.
PNGs exported from design tools often have soft, semi-transparent edge pixels. The stroke treats those as content (alpha > 0), which can make the outline slightly fuzzy. If you need a razor-sharp stroke, flatten the edges to fully opaque or fully transparent before uploading.
Technical Details
- Processing: 100% client-side — your image never leaves the browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Max Image Size: Limited only by your device’s available memory (tested up to 8000×8000)
- Output Format: PNG with full alpha transparency preserved
- Canvas Expansion: Automatic — stroke width added to all four sides
Frequently Asked Questions
How do I add an outline to a PNG image online?
Upload your PNG here, pick a stroke color and width, and the outline gets drawn automatically around non-transparent areas. Hit download and you’re done — no account, no install, no waiting.
Does the stroke follow the shape of my image or just add a rectangle?
It follows the exact shape. The tool reads every pixel’s transparency value and traces the boundary between visible content and transparent areas. So a star-shaped logo gets a star-shaped stroke, not a box.
Will the stroke cut into my original image?
No. The canvas is expanded by the stroke width on every side before the outline is painted. Your original content stays pixel-perfect at the center, and the stroke only occupies the new space around it.
Is my image uploaded anywhere when I use this tool?
Nope. Everything runs in your browser using the Canvas API. Your file never touches a server. You can even disconnect from the internet after the page loads and it still works fine.
Can I add a stroke to a JPEG or SVG file?
This tool needs a PNG with transparency. JPEGs have no alpha channel, so the stroke just wraps the entire rectangle. SVGs are vector — you’d add a stroke in the SVG code itself. For best results, start with a PNG that has a transparent background.