Blurring and Pixelation: How to Redact Sensitive Information in Images the Right Way
Blurring and pixelation are the standard tools for hiding faces, passwords, and personal data in screenshots. But not all redaction is equally secure — pixelated text can sometimes be reversed. Here's how both techniques work, when each is appropriate, and what the security limitations actually are.
Every time you share a screenshot that contains someone's email address, a visible password field, a license plate in the background, or a private conversation in a notification bar, you face a choice: remove the sensitive information, or risk exposing it. The two most common techniques for in-image redaction are blurring and pixelation — both reduce the visual detail in a selected region to make the underlying content unreadable. They are built into every major image editor, screenshot tool, and messaging platform, and they are the default approach for privacy protection in everything from journalism to corporate communications.
But blurring and pixelation are not interchangeable, they are not equally secure, and in some cases they can be partially reversed. Understanding how each technique works at the pixel level — and what its actual security properties are — is essential for anyone who shares images containing sensitive information.
How Gaussian Blur Works
Gaussian blur is a convolution operation — a mathematical process where each pixel's new value is computed from a weighted average of its neighboring pixels. The weights follow a Gaussian (bell curve) distribution: the center pixel contributes the most, nearby pixels contribute significantly, and distant pixels contribute very little. The size of the neighborhood is determined by the kernel radius — a larger radius means more pixels are averaged together, producing a stronger blur.
For a Gaussian kernel with radius r, each output pixel is influenced by a (2r+1) by (2r+1) grid of source pixels. At radius 1, you are averaging a 3 by 3 neighborhood — a very subtle softening. At radius 10, you are averaging a 21 by 21 neighborhood — a heavy blur that obliterates fine detail. At radius 30 or above, individual characters of text become completely unrecognizable.
The Gaussian distribution is important because it produces a natural-looking blur without sharp transitions or artifacts. Alternatives like box blur (uniform averaging) produce visible banding, and motion blur introduces directional smearing that looks artificial. Gaussian blur is the standard for aesthetic blurring because it matches how optical defocus works in the physical world — the same bell-curve distribution of light that a lens produces when an object is out of focus.
In the browser, Gaussian blur can be implemented through the Canvas API using ctx.filter = "blur(Npx)" where N is the blur radius in pixels. This uses the browser's native rendering pipeline, which is GPU-accelerated in most modern browsers and runs significantly faster than a JavaScript pixel-by-pixel convolution. Our image blur and pixelate tool uses this approach for real-time blur preview with adjustable intensity.
How Pixelation Works
Pixelation — sometimes called mosaic filtering — replaces each block of pixels with a single uniform color, typically the average color of all pixels in the block. A pixelation block size of 10 means every 10 by 10 pixel region becomes a single solid-colored square. The original detail within each block is completely destroyed and replaced by one color value.
The implementation is straightforward: divide the image (or selected region) into a grid of blocks, compute the average RGB value for each block, and fill the entire block with that average color. In the Canvas API, this can be done by scaling the image down to a tiny size (where each pixel corresponds to one block) and then scaling it back up with imageSmoothingEnabled set to false, which produces the characteristic blocky mosaic appearance without any interpolation.
The visual effect is distinctive and immediately recognizable — everyone who has watched the evening news has seen pixelated faces. The block size determines how much detail is obscured. At block size 5, small text is still partially readable. At block size 15 to 20, individual characters become unrecognizable. At block size 30 or above, even the general shape of objects is obscured.
Blur vs. Pixelation: Security Properties
Both techniques make content visually unreadable, but their security properties differ significantly.
Gaussian blur is more difficult to reverse. Because each output pixel is a weighted average of many input pixels, and multiple input pixels contribute to multiple output pixels (the neighborhoods overlap), the mathematical relationship between the blurred result and the original is a many-to-many mapping. Reversing this — a process called deconvolution — is theoretically possible but highly ill-conditioned. Small amounts of noise (from JPEG compression, color space rounding, or sensor noise) make the inverse computation unstable. In practice, deconvolving a heavily blurred region recovers only vague shapes, not readable text. Gaussian blur with a radius of 15 or above is considered effectively irreversible for text content.
Pixelation has a known vulnerability for text. Because pixelation replaces each block with a single average color, the relationship between the original content and the pixelated result is simpler than with blur. If an attacker knows the font, font size, and approximate character set of the original text, they can render every possible character (or character sequence) at that size, apply the same pixelation, and compare the results against the pixelated image. Open-source tools like Depix automate this process and have demonstrated successful recovery of pixelated passwords, usernames, and other short text strings.
The vulnerability is real but has important caveats. Depix-style attacks work best on monospaced text at predictable sizes — terminal output, password fields in screenshots, and code editors with known fonts. They work poorly on variable-width fonts, handwriting, or text overlaid on complex backgrounds. They also require the attacker to know or guess the font and rendering parameters. And they become exponentially harder as the block size increases — at block sizes of 20 or above, even Depix produces unreliable results for most font sizes.
Still, the vulnerability means that for high-security redaction of text content — passwords, API keys, personal identification numbers, classified information — pixelation alone should not be relied upon. Gaussian blur at high radius is safer, and solid-color overlay (a black or white rectangle that completely replaces the original pixels) is the most secure option of all.
When Pixelation Is Appropriate
Despite the text recovery vulnerability, pixelation remains the right choice for many common redaction scenarios.
Faces in photographs are the most common pixelation use case, and they are not vulnerable to the Depix-style attack. Faces are variable, complex, high-dimensional data — there is no "font" to match against, and the number of possible face configurations is astronomically large. Pixelation at block size 15 or above renders faces unrecognizable and is not practically reversible.
License plates, addresses on buildings, and other non-text visual identifiers are similarly safe to pixelate. The attack surface for reversal requires a constrained character set and predictable rendering, which real-world signage does not provide.
General background content — bystanders in a street photograph, neighboring buildings in a real estate listing, competing products in a review screenshot — is safely handled with either blur or pixelation at moderate intensity.
The rule of thumb: use pixelation for non-text content and faces. Use heavy Gaussian blur or solid overlay for text content, especially passwords, keys, and any information with a small, known character space.
Redaction Best Practices
Effective redaction requires more than just applying a filter. Several common mistakes can undermine the protection.
Insufficient intensity is the most frequent error. A light blur or small pixelation block size may make text difficult to read but not impossible. Always test your redaction by zooming in to 200 to 400 percent and attempting to read the redacted content. If you can discern any characters, increase the intensity.
Redacting in a layer-based editor without flattening is dangerous. If you apply a blur in Photoshop and save as PSD, the original layer data may still be present. Always flatten or merge layers before exporting, and export to a flat format like PNG or JPEG — not PSD, TIFF with layers, or any format that preserves the editing history.
Metadata leakage can expose information you thought was redacted. EXIF data in photographs can contain GPS coordinates, camera serial numbers, and timestamps. For our article on EXIF orientation we discussed how EXIF metadata works — the same data that carries orientation also carries potentially sensitive location information. Strip EXIF metadata when sharing redacted images.
Overlaid semi-transparent shapes are not redaction. A 50-percent-opacity black rectangle over text reduces contrast but does not destroy the underlying information — adjusting levels or curves in any image editor can recover the text. Redaction shapes must be fully opaque and composited (flattened) onto the image, not applied as a separate layer or annotation.
Insufficient area around the redacted content can leave contextual clues. If you pixelate a password but leave the label "Password:" visible next to it, an attacker knows exactly what was redacted and may be able to narrow the possibilities. Redact generously — include labels, surrounding context, and any adjacent information that could help identify the content.
The GDPR and Privacy Compliance Angle
The General Data Protection Regulation and similar privacy laws worldwide impose obligations on organizations that process personal data. Images containing recognizable faces, names, addresses, vehicle registrations, or other personal identifiers constitute personal data under these regulations. Sharing such images — in social media posts, blog articles, marketing materials, support tickets, or internal documentation — without adequate anonymization can constitute a data protection violation.
Blurring and pixelation are accepted anonymization techniques under GDPR guidance, provided they are applied at sufficient intensity to prevent re-identification. The Article 29 Working Party opinion on anonymization techniques specifically notes that pseudonymization (including visual obscuring) must be irreversible in practice, considering available technology and the cost of reversal.
For organizations handling screenshots in support workflows, QA documentation, or training materials, establishing a standard redaction process — specifying minimum blur radius or pixelation block size, requiring metadata stripping, and mandating flat-format export — reduces compliance risk significantly. Our image blur and pixelate tool provides a consistent, browser-based workflow for this purpose, with everything processed locally so that the unredacted image is never uploaded to any server.
Implementation in the Browser
The Canvas API provides two approaches for implementing blur and pixelation, each with different performance characteristics.
For Gaussian blur, the CSS filter property applied to the canvas context is the fastest approach. Setting ctx.filter = "blur(15px)" before calling drawImage applies GPU-accelerated Gaussian blur during the draw operation. The result is immediate even on large images. The alternative — reading pixel data with getImageData, applying a manual convolution kernel in JavaScript, and writing back with putImageData — is orders of magnitude slower for large blur radii because it cannot leverage GPU acceleration.
For pixelation, the scale-down-and-up technique is the most efficient. Draw the image onto a tiny canvas (original dimensions divided by the block size), then draw that tiny canvas back onto the full-size canvas with imageSmoothingEnabled = false. The browser handles the scaling natively, and the nearest-neighbor upscale without smoothing produces the blocky mosaic effect. This is faster and produces cleaner results than manually iterating through blocks and filling rectangles.
Our image blur and pixelate tool uses both techniques with a real-time preview that updates as you adjust the intensity slider. You can apply the effect to the entire image or, for more targeted redaction, use it in combination with our image cropper — crop the sensitive region, apply the blur or pixelation, and recombine.
Blur and Pixelation for Non-Privacy Uses
Beyond privacy redaction, blur and pixelation serve several other purposes in image processing and design.
Depth-of-field simulation uses Gaussian blur to mimic the shallow focus of a wide-aperture lens. The subject remains sharp while the background is blurred, drawing the viewer's eye to the subject. This technique is widely used in product photography, portrait editing, and thumbnail creation.
Placeholder images for lazy-loading on the web often use a heavily blurred version of the full image. The blurred placeholder loads instantly (because it can be encoded at very low resolution), gives the user a visual preview of the content and layout, and is replaced by the full image once it finishes loading. This technique — popularized by Medium and adopted by many content platforms — improves perceived performance and reduces layout shift.
Artistic effects include tilt-shift simulation (selective blur to make real scenes look like miniature models), background blur for text readability (blurring the image behind an overlay), and stylistic mosaic effects. Pixelation is also used in retro and pixel-art aesthetics, deliberately applied to create a low-resolution vintage look.
The Bottom Line
Blurring and pixelation are essential tools for image privacy, but they are not interchangeable and not uniformly secure. Gaussian blur at high radius is effectively irreversible and safe for all content types. Pixelation is safe for faces and non-text content but has a documented vulnerability for text in predictable fonts — use heavy pixelation or solid overlay for passwords, keys, and other sensitive text. In all cases, verify intensity at high zoom, flatten all layers before export, strip metadata, and redact generously. Our image blur and pixelate tool handles both techniques entirely in your browser, with real-time preview and no server upload — because when the goal is protecting sensitive information, not sending it to a third-party server is the most important security property of all.
References
Mariner Innovations — Pixelation Pitfalls: Safeguarding Sensitive Information the Right Way — Analysis of how pixelated text can be reversed using tools like Depix, with recommendations for more secure redaction methods.
setosa.io — Image Kernels Explained Visually — Interactive visual explanation of convolution kernels, including Gaussian blur, sharpening, and edge detection.
MDN — CanvasRenderingContext2D.filter — Documentation for applying CSS filters (including blur) to Canvas drawing operations.
Article 29 Working Party — Opinion 05/2014 on Anonymisation Techniques (PDF) — The EU advisory body's guidance on anonymization techniques including visual obscuring, relevant to GDPR compliance.
Wikipedia — Gaussian Blur — Technical overview of Gaussian convolution, kernel computation, and the separable property that enables efficient implementation.