How to Auto-Redact Emails, API Keys & PII in Screenshots Before Pasting to ChatGPT (100% Offline on Windows)
Every day, developers and knowledge workers take screenshots of error logs, dashboards, billing pages, or Slack threads and paste them directly into ChatGPT, Claude, GitHub Issues, or X (Twitter). Even when the main par
Every day, developers and knowledge workers take screenshots of error logs, dashboards, billing pages, or Slack threads and paste them directly into ChatGPT, Claude, GitHub Issues, or X (Twitter).
Even when the main part of your screen looks safe, sensitive PII (Personally Identifiable Information) and secrets often lurk in the corners:
- An email address or account name in the top-right navbar
- An
sk-...OpenAI API key, AWS key (AKIA...), or Bearer token in a terminal or.envpreview - A customer phone number, IPv4 address, or credit card number in a debug payload
Manually drawing blur/pixelate boxes over 6 different places in an image editor takes 30+ secondsβso people either skip it (risking a leak) or avoid sharing screenshots altogether.
To solve this, I built 1-Click Offline Auto-Redact PII (Ctrl + Shift + M) into SnapBolt v2.6.4 for Windows 10/11.
π Free Download (Manual Pixelate + Step Badges Free Forever / First 10 Auto-Redactions Free):
https://snapbolt.dev/en/auto-redact-pii-screenshot-windows
π 1. How 1-Click Offline Auto-Redact (Ctrl + Shift + M) Works
When you capture a region with SnapBolt (PrintScreen or Ctrl + Shift + S):
- Click the
π Auto-Redactbutton on the toolbar (or pressCtrl + Shift + M). - SnapBolt runs Windows native on-device OCR (
Windows.Media.Ocr) in memoryβ100% offline with zero cloud uploads. - It scans every recognized word and line against a multi-pattern PII & secret detector:
-
Emails:
[email protected] -
API Keys & Tokens:
sk-...,ghp_...,AKIA...,AIza..., JWTs - Phone Numbers & Credit Cards: International & local phone formats, 13β16 digit card numbers
- Network & IDs: Private/public IPv4 addresses, postal codes, and labeled personal names/addresses
-
Emails:
- Every matched bounding box (
OcrWord.BoundingRect) is immediately pixelated on the canvas (and supportsCtrl + ZUndo if you want to un-redact a box). - Press
Ctrl + C(or just close to auto-copy) and hitCtrl + Vdirectly into ChatGPT, Claude, Slack, or GitHub!
π» Under the Hood: C# / WPF On-Device OCR + Bounding-Box Pixelation
Because security-conscious users never want raw screenshots uploaded to a third-party OCR API, we use Windows 10/11's built-in Windows.Media.Ocr.OcrEngine, which runs locally on the client machine:
using Windows.Graphics.Imaging;
using Windows.Media.Ocr;
public async Task<IReadOnlyList<Rect>> DetectPiiRegionsAsync(SoftwareBitmap bitmap)
{
var ocrEngine = OcrEngine.TryCreateFromUserProfileLanguages()
?? OcrEngine.TryCreateFromLanguage(new Windows.Globalization.Language("en-US"));
if (ocrEngine == null) return Array.Empty<Rect>();
OcrResult result = await ocrEngine.RecognizeAsync(bitmap);
var regions = new List<Rect>();
foreach (var line in result.Lines)
{
foreach (var word in line.Words)
{
if (PiiRegexMatcher.IsSensitiveToken(word.Text))
{
var r = word.BoundingRect;
regions.Add(new Rect(r.X - 4, r.Y - 2, r.Width + 8, r.Height + 4));
}
}
}
return regions;
}
Because OcrWord.BoundingRect gives exact pixel coordinates for each token on the captured SoftwareBitmap, we can apply an irreversible block-mosaic filter directly to those rectangles without touching the rest of the screenshot.
π 2. Bonus in v2.6.4: Smart Edge-Detecting Pixel Ruler (D Key)
For frontend developers and UI designers checking padding, margins, and alignment on Windows:
- Press
D(or select theπ Rulertool) during capture. - Hover anywhere on your screen: SnapBolt automatically ray-casts in 4 directions (
Left,Right,Top,Bottom) to detect UI container edges by luminance contrast and displays the exactW Γ H pxdimensions in real time. - You can also drag to measure any custom distance and bake the measurement line directly into your screenshot for design QA tickets!
- Learn more: https://snapbolt.dev/en/screen-pixel-ruler-measure-windows
πΌοΈ 3. Floating Pin with Translucent Drag-and-Drop
Pin any screenshot always-on-top (Pin button), and when you're ready to use it, simply drag the pinned window (with a live translucent preview thumbnail following your cursor) and drop it straight into ChatGPT, Slack, Discord, Notion, or VS Code.
π Try SnapBolt v2.6.4 for Windows 10 / 11
Manual pixelation, β β‘β’ auto-incrementing step badges, arrows, frames, floating pins, and 10-second MP4/GIF screen recordings are 100% free forever with zero watermarks. And the new 1-Click Auto-Redact PII (Ctrl + Shift + M) includes 10 free uses out of the box (plus a 14-day full Pro trial via the invite link below):
- π Official Website (14-Day Full Pro Trial): https://snapbolt.dev/en/r/8Y9PHK
- π Auto-Redact PII Guide: https://snapbolt.dev/en/auto-redact-pii-screenshot-windows
- π Smart Pixel Ruler Guide: https://snapbolt.dev/en/screen-pixel-ruler-measure-windows
- π’ Microsoft Store (Official Verified App): https://apps.microsoft.com/detail/9N4SCZ62453G
- π GitHub Repository: https://github.com/poron2356-a11y/SnapBolt
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.