A privacy-first, browser-based tool for detecting and redacting faces in images.
Private Face Redactor runs locally in your browser. Your photos are processed on your device and are not uploaded to a server. It supports automatic face detection, manual masks, several redaction effects, stamps, and image export controls.
Important: Always review the final image before sharing it. Face detection can miss faces or produce imperfect bounding boxes.
Open the hosted app:
https://ttomohisa.github.io/htmlapps-private-face-redactor/private-face-redactor.html
Or download private-face-redactor.html and open it locally.
- Local, in-browser image processing
- Automatic face detection powered by YuNet and ONNX Runtime Web
- Manual masks for missed faces or other sensitive areas
- Draggable and resizable masks
- Undo and redo support
- Face and mask list with individual enable, edit, delete, and original-crop download actions
- Multiple redaction effects:
- Pixelate
- Blur
- Solid fill
- Eye bar
- Emoji
- Custom image overlay
- Adjustable padding around detected faces
- Rectangle or oval mask shapes
- Customizable eye-bar color, opacity, length, and thickness
- Built-in stamps, text stamps, and custom image stamps
- Zoom, pan, and mobile touch support
- Export to JPEG, PNG, or WebP
- Adjustable output quality and image scale
- Pre-save output dimensions and estimated file size
- Native sharing on supported browsers
- Responsive UI for desktop and mobile
The app supports JPEG, PNG, and WebP images for export. Video files can be opened and previewed, but video export is not currently supported.
- Open
private-face-redactor.htmlin a modern browser. - Drop a photo into the canvas area, or click Choose file.
- Wait for automatic face detection, or click Find faces manually.
- Review every detected face.
- Add a manual mask for anything the detector missed.
- Choose an effect in the bottom Effect dock.
- Adjust effect settings such as blur, pixel size, padding, or shape.
- Click Save.
- Review output dimensions and estimated file size.
- Save the redacted image.
The app works without network access after the HTML file has been downloaded.
- Image processing happens in the browser.
- Images are not uploaded to an application server.
- Face detection runs locally through the embedded ONNX Runtime Web and YuNet model.
- Exported files are downloaded directly by the browser.
- Saved files use the original filename with
_redactedappended.
For example:
holiday-photo.jpg
becomes:
holiday-photo_redacted.jpg
| Effect | Description | Main Controls |
|---|---|---|
| Pixelate | Covers an area with mosaic blocks | Block size, padding, shape |
| Blur | Softens facial detail | Blur radius, padding, shape |
| Solid fill | Covers an area with a selected color | Color, padding, shape |
| Eye bar | Places a configurable bar over the eyes | Color, opacity, length, thickness |
| Emoji | Places an emoji over the selected area | Emoji, padding |
| Custom image | Places a user-selected image over the selected area | Overlay image, padding |
| Format | Best for | Notes |
|---|---|---|
| JPEG | Photos and broad compatibility | Smaller files, lossy compression |
| WebP | Smaller web-friendly images | Often smaller than JPEG |
| PNG | Graphics, text, and lossless output | Can produce larger files |
The estimated file size is calculated by encoding the current redacted image in the browser using the selected format, quality, and scale. It is a practical estimate, although final file size can vary slightly between browsers.
This project is designed as a single HTML file.
git clone https://github.com/ttomohisa/private-face-redactor.git
cd private-face-redactorThen open the HTML file in a modern browser:
private-face-redactor.html
Use a recent version of one of the following:
- Google Chrome
- Microsoft Edge
- Mozilla Firefox
- Safari
Recommended browser capabilities:
- ES Modules
- Canvas 2D API
- File API
- Blob and Object URL support
- WebAssembly
- Pointer Events
- Web Share API for the optional Share button
The interface is responsive and includes mobile-oriented controls:
- Compact action header with mask, stamp, undo, redo, clear, share, and save actions
- Touch-friendly resize handles
- Zoom and pan support
- Bottom horizontal Effect dock
- Horizontal scrolling inside the Effect dock when settings exceed available width
- Collapsible setup sections
| Key | Action |
|---|---|
D |
Find faces |
M |
Add a manual mask |
Delete |
Delete the selected mask |
Space |
Play or pause a loaded video |
private-face-redactor/
└── private-face-redactor.html
The application is distributed as a self-contained HTML file that includes:
HTML UI
CSS styling
JavaScript application logic
Embedded ONNX Runtime Web assets
Embedded YuNet face-detection model
- Face detection is not perfect and may miss faces.
- You must manually verify every image before sharing or publishing it.
- Video files can be loaded and previewed, but cannot currently be exported.
- Large images or images containing many faces may take longer to process.
- The file-size estimate is informative, not a guaranteed final size.
- Browser support for native sharing varies by device and browser.
- Custom overlays and stamps depend on browser Canvas support.
The application maintains face masks, manual masks, stamps, selection state, and undo/redo history in browser memory. The editing overlay is rendered separately from the output Canvas, so selection borders, resize handles, and delete controls are not included in exported images.
When modifying the project, pay particular attention to:
- Canvas coordinates versus displayed screen coordinates
- Zoom and pan transformations
- Responsive CSS overrides for the Effect dock
- Asynchronous image loading and face detection
- Object URL cleanup
- Undo/redo snapshots
- Preventing stale file-size estimates from replacing newer estimates
Potential future improvements include:
- Unredacted-face review mode
- Batch operations for all masks
- Before/after comparison preview
- Redaction presets
- Mask duplication
- Region-only face re-detection
- License-plate and text detection
- EXIF/privacy metadata controls
- Export for redacted videos
Contributions, bug reports, UI improvements, and privacy-focused feature ideas are welcome.
Before opening a pull request:
- Test on desktop and mobile screen widths.
- Test JPEG, PNG, and WebP exports.
- Verify that selection outlines are not included in output files.
- Verify that Undo and Redo work after mask movement, resizing, deletion, and effect changes.
- Confirm that the application does not require image uploads to a server.
Copyright (c) 2026 Tomohisa Takagi.
This project is available under the MIT License.
In short: you may use, copy, modify, and distribute it, including for commercial purposes, as long as the license notice is included with substantial copies.
This project bundles or uses the following third-party components:
| Component | License | Redistribution notes |
|---|---|---|
| ONNX Runtime Web | MIT License | You may use, modify, and redistribute it, including in commercial projects, provided that the Microsoft copyright notice and MIT license text are included in copies or substantial portions of the software. |
| YuNet face detection model | MIT License | The face_detection_yunet directory in OpenCV Zoo, including its YuNet ONNX model files, is licensed under the MIT License. Preserve the applicable copyright and license notice when redistributing the model. |
| ONNX format | Apache License 2.0 | The ONNX project itself is Apache-2.0 licensed. This generally does not impose copyleft requirements, but its license and NOTICE requirements should be preserved if ONNX project code is redistributed. |

