Image Border
Add a customizable border with any width and color — 100% in your browser.
Source
Solte sua imagem aqui
ou clique para procurar
Options
What is an image border?
An image border is a colored frame drawn around the outer edge of a picture. It is one of the oldest and simplest forms of image decoration — a thin or thick outline that visually separates the photo from its background and gives it a finished, framed look. Borders can be purely functional (marking the edge of a scanned document, framing a passport photo to specification) or purely aesthetic (adding a clean white gallery mat, a vintage darkroom edge, or a bold color accent that matches a brand). Unlike a drop shadow or vignette, a border is a hard, solid edge with a defined color and width.
Although a border sounds simple, the way it is drawn matters. A correctly drawn border sits flush with the image edges and uses an even line weight on all four sides. This tool draws the border with the browser's Canvas 2D API using strokeRect, which renders a crisp, perfectly even frame in any color and any width from 0 to 100 pixels. The border is drawn on top of the image, so it always covers the outermost pixels — the rest of the photo stays untouched. Everything runs locally in your browser, so your images are never uploaded.
How the border tool works
This tool uses the browser's Canvas 2D API. After decoding your image, it creates a canvas of the same pixel dimensions, draws the image at full resolution, and then strokes a rectangle around the perimeter using ctx.strokeStyle for the color, ctx.lineWidth for the thickness, and ctx.strokeRect to render the frame. Because the canvas stroke is centered on the path, the rectangle is inset by half the line width so the border stays fully inside the canvas and never spills outside the image bounds.
The width slider goes from 0 to 100 pixels. A width of 0 produces no visible border (essentially a passthrough). The color picker accepts any sRGB color — pick white for a classic gallery mat, black for a darkroom print edge, or use the brand-blue default (#0EA5E9) for a modern accent. Once the border is drawn, the canvas is re-encoded to your chosen format. PNG preserves the exact color and crisp edges; JPG and WebP apply light compression but are usually indistinguishable for solid-color borders.
Border widths and their effect
The width of a border completely changes how it reads. A thin hairline feels like a precise crop marker, while a thick frame turns the photo into a poster. The table below shows what each range of widths does:
| Width | Effect | Typical use |
|---|---|---|
| 0 px | No border | Passthrough, original look |
| 1–3 px | Hairline outline | Defining edge on busy backgrounds, web thumbnails |
| 4–10 px | Subtle frame | General framing, social media posts, galleries |
| 15–30 px | Clear matte | Gallery-style mat, passport and ID photos |
| 40–60 px | Bold accent frame | Poster design, framed prints, accent color |
| 70–100 px | Heavy frame | Statement framing, vintage postcard, sticker mockup |
Start with the default 10 px and adjust until the frame feels balanced with the image. Small images need thinner borders; large images can carry wider ones.
When to add an image border
Adding a border is the right move whenever an image needs a defined edge, a framed look, or a visual separator from its background. Common scenarios include:
- Gallery and portfolio presentation. A thin neutral border makes photos read as "finished" pieces in an online gallery or portfolio.
- Social media posts. A colored frame helps photos stand out against white or light UI backgrounds and reinforces a brand palette.
- Passport and ID photos. Many official photo specs require a defined border or specific framing — a solid border makes the framing explicit.
- Print preparation. A white border acts as a mat, giving the printed photo breathing room and avoiding ink bleed to the page edge.
- Busy backgrounds. On cluttered web pages, a hairline border separates a transparent or light-colored image from its surroundings.
- Scanned documents. A border marks the scanned page boundary clearly, useful for archival and OCR workflows.
- Poster and sticker design. A bold colored border turns a plain photo into a graphic element that fits a layout.
Whenever a photo needs a hard, defined edge rather than a soft transition, a solid border is the simplest and most reliable choice.
How to add a border to an image
Adding a border with this tool takes only a few seconds and runs entirely in your browser — no uploads, no sign-up, no watermark. The tool decodes your image locally, draws the border through the Canvas API, and lets you export the result in the format you need. Follow these steps:
- Upload your image. Click the upload area or drag and drop a JPG, PNG, WebP, GIF or BMP file. The image is decoded and previewed instantly.
- Set the border width. Use the slider from 0 to 100 px. 0 produces no border; the default 10 px gives a subtle frame.
- Choose a border color. Use the color picker to pick any color. The default brand blue works well as a modern accent.
- Choose an output format. Pick PNG for crisp edges, JPG for smaller photos, or WebP for a modern balance of size and quality.
- Click Apply Border. The tool processes the image and shows the original and bordered file sizes side by side.
- Download the bordered image. Click "Download Bordered" to save the result. The original file stays untouched on your device.
Because every step runs locally in your browser using JavaScript, your image is never uploaded to a server. This makes the border tool completely private, fast and suitable for sensitive or confidential images.
Is this image border tool free?
Yes, completely free with no sign-up, watermarks or limits.
What is the maximum border width?
The slider goes from 0 to 100 pixels. 0 produces no border, 100 px produces a heavy frame.
Can I use any border color?
Yes. The color picker accepts any sRGB color. The default is a brand blue (#0EA5E9).
Does the border cover part of the image?
Yes. The border is drawn on top of the image's outermost pixels. If you need to preserve every pixel, choose a smaller width.
Are my images uploaded?
No. All processing is local. Your images never leave your browser.