WebTools

307 Useful Tools & Utilities to make life easier.

Image Censor

Securely redact, blur, or black out sensitive information from your photos in your browser.

Upload Image

Drag and drop your image here

Max File Size: 64MB
Image Censor

Image will appear here. Draw rectangles over sensitive areas to censor them.

How to blur: Click and drag your mouse over the sensitive areas on the image above to apply the censor effect.

Understanding the Image Censor Tool

The Image Censor tool provides a quick and precise way to redact sensitive information from photographs and screenshots. Whether you need to obscure faces, hide personal identification numbers, or block out license plates, this utility gives you fine-grained control over exactly what gets censored. Built using the native HTML5 Canvas API and Alpine.js, it processes all redactions by mapping out coordinates and applying visual transformations to specific regions of your image.

Supported File Types and Size Limits

Before applying any redaction filters, the tool performs a strict validation check on your uploaded file. It currently accepts images in PNG, JPG, JPEG, and WebP formats. If you attempt to upload an unsupported format, such as an SVG or a GIF, the system will immediately reject it and display an error message. Additionally, the tool calculates the maximum allowed file size dynamically by checking your server environment's upload_max_filesize and post_max_size limits. If your image exceeds this threshold, the upload is blocked before rendering even begins.

How the Censoring Mechanisms Work

Once your image is loaded onto the interactive canvas, you can choose from three distinct censoring methods. Each method utilizes a different Canvas API rendering technique to obscure the underlying pixels within the bounding box you draw.

  • Blur: When you select the blur option, the tool utilizes the Canvas 2D Context filter property. As you adjust the intensity slider (which ranges from 1 to 50), the tool applies a Gaussian blur effect defined by blur(Xpx) to the selected coordinates. The script uses a clipping mask (ctx.clip()) to ensure the blur effect does not bleed outside the rectangle you drew.
  • Pixelate: The pixelation effect is achieved through a multi-step scaling process. First, the tool creates an invisible off-screen canvas matching the size of your drawn rectangle. It then calculates a scaling factor using the formula Math.max(0.01, 1 - (intensity / 55)). The selected region of the image is drawn onto this smaller off-screen canvas, effectively compressing the visual data. Finally, this compressed miniature is scaled back up to fit the original bounding box on the main canvas with imageSmoothingEnabled explicitly set to false. This prevents the browser from anti-aliasing the scaled image, resulting in the blocky, pixelated aesthetic.
  • Solid Color (Blackout): This is the simplest and most destructive redaction method. Instead of transforming the existing pixels, it completely overwrites them. You select a color using a standard HTML color picker, and the tool uses the ctx.fillRect() method to draw an opaque block of that exact color over your specified coordinates. This is the safest option for ensuring absolute redaction of sensitive text.

Interactive Controls and Coordinate Mapping

The interface relies on precise mouse tracking to define the areas you want to censor. When you click and drag your cursor over the loaded image, the tool calculates your mouse coordinates relative to the canvas dimensions. During the drag motion, it visualizes your selection by rendering a dashed red border with a semi-transparent red fill overlay.

Upon releasing the mouse button, the script logs the X and Y starting coordinates alongside the calculated width and height of your selection. This data is pushed into an array of active redaction boxes. Because these boxes are stored in an array, the tool features an Undo Last button, which simply pops the most recent coordinate object off the stack and redraws the canvas. Similarly, the Clear All button empties the array entirely, restoring your image to its original state.

A Concrete Worked Example

Let’s say you upload a document_scan.webp image measuring 1200x1600 pixels, which contains a sensitive phone number located at coordinates X: 400, Y: 800.

You select the Pixelate tool and set the intensity slider to 30. You then click at (400, 800) and drag your mouse to (700, 850) to cover the phone number. Releasing the mouse logs a box with a width of 300px and a height of 50px.

Behind the scenes, the tool calculates a scaling factor based on your intensity of 30: 1 - (30 / 55) = 0.454. The 300x50 pixel region containing the phone number is drawn onto a tiny off-screen canvas scaled down to approximately 136x22 pixels. This miniature version is then stretched back out to 300x50 pixels on your main image with smoothing disabled, rendering the phone number as illegible, chunky blocks. When you click download, the script generates a base64 Data URL matching the original WebP format and triggers a download for document_scan_censored.webp.

Frequently Asked Questions

Can I apply different types of censors to the same image?

Yes. The tool stores each redaction box as an independent object containing its specific coordinates, censor type, color, and intensity level. You can blackout a name, blur an address, and pixelate a photograph all on the same image simultaneously.

Is there a limit to how small of a box I can draw?

Yes, the script includes a minimum threshold. If the width or height of the box you draw is 5 pixels or less, the tool will ignore the action and no censor effect will be applied. This prevents accidental micro-clicks from cluttering your canvas with imperceptible dots.

What format will my downloaded image be in?

The tool preserves your original file format. If you upload a PNG, the script uses the canvas toDataURL('image/png') method to ensure your censored output remains a PNG. The downloaded file will automatically have _censored appended to its original filename.

Does the Solid Color option support transparency?

No, the solid color option utilizes a standard HTML hex color input which does not support an alpha channel (transparency). The intention of this specific mode is to completely and opaquely block out the underlying pixels for guaranteed redaction.

Contact

Missing something?

Feel free to request missing tools or give some feedback using our contact form.

Contact Us