Screenshot Beautifier: how it works and how to build one
Put screenshots on a gradient with a window frame and shadow. This guide explains what happens behind the button and shows the code, so you can build your own.
What it does
Make app and code screenshots look polished for X, LinkedIn, README files and slides. Add a gradient background, a light or dark browser window frame, rounded corners, padding and a soft shadow.
When to use it
- Social posts about your product
- Blog and docs images
- Pitch decks
How to use it
- Choose or drop a screenshot.
- Pick a background and window style.
- Download as PNG.
Try it free in your browser, nothing is uploaded: https://eskillsfy.com/tools/screenshot-beautifier
How it works
The beautifier draws a background (gradient or solid), then a rounded rectangle with a soft shadow, an optional fake window bar with three dots, and the screenshot clipped to the rounded shape.
Canvas shadows (shadowBlur, shadowOffsetY) are applied to the frame shape, and roundRect + clip() gives the screenshot rounded corners.
Build it yourself
Here is the core of the tool. It has no dependencies unless noted, so you can paste it into any TypeScript or JavaScript project.
beautify.ts (ts)
export function beautify(shot: HTMLImageElement, pad = 80, radius = 16) {
const W = shot.naturalWidth + pad * 2, H = shot.naturalHeight + pad * 2;
const c = Object.assign(document.createElement("canvas"), { width: W, height: H });
const g = c.getContext("2d")!;
const bg = g.createLinearGradient(0, 0, W, H); bg.addColorStop(0, "#f3d9b1"); bg.addColorStop(1, "#5b3a63");
g.fillStyle = bg; g.fillRect(0, 0, W, H);
g.save();
g.shadowColor = "rgba(0,0,0,.35)"; g.shadowBlur = 40; g.shadowOffsetY = 20;
g.beginPath(); g.roundRect(pad, pad, shot.naturalWidth, shot.naturalHeight, radius); g.fillStyle = "#fff"; g.fill();
g.restore();
g.save(); g.clip(); g.drawImage(shot, pad, pad); g.restore();
return c;
}
Make it production-ready
- Add a browser-style title bar.
- Offer canvas ratios like 16:9 for social.
Questions
What size is the output?
Your screenshot keeps its full resolution; padding is added around it. Pick 16:9 or 1:1 for a fixed canvas shape.
Free, runs in your browser, nothing is uploaded.