A privacy-first data anonymization tool for researchers, scientists, and technical users.
DataMask lets you anonymize sensitive datasets entirely in your browser — before uploading them to AI tools, cloud scripts, or external collaborators. No data ever leaves your device.
Modern AI-assisted workflows are powerful, but they come with a real privacy risk: when you upload a dataset to an AI tool, that data may be logged, retained, or used for model training. For researchers working with unpublished results, experimental cohorts, sample identifiers, or proprietary measurements, this is not an acceptable trade-off.
DataMask was built to solve this. It gives you a clean, fast way to anonymize sensitive data locally — so you can safely use AI tools, share files with collaborators, or hand off data to scripts without exposing anything real.
| Mode | Method | Reversibility |
|---|---|---|
| Lite | Random noise, shuffle, replace, or scale & shift | Reversible with effort |
| Strong | Normalize → sigmoid distortion → cross-column mixing | Hard to reverse without a reference — but monotonic, so rank order is preserved (re-identifiable by rank) |
| Vault | SHA-256 per-cell seeding → PRNG synthetic values | Cryptographically irreversible |
All selected text columns (sample names, strain IDs, group labels, metadata) are replaced with consistent SAMPLE_001, SAMPLE_002, … labels across every row.
Download anonymized data as .xlsx, .csv, .tsv, .txt, or .json — with a custom filename prompt before every download.
By default every selected column uses the global mode. Optionally, assign a different tier to individual columns — e.g. keep identifiers in Vault while lightly perturbing measurements in Lite — from the collapsible "Per-column mode overrides" panel in the protection step.
After each run you can download a reproducibility log (JSON or plain text) listing which columns were anonymized, the mode(s) used, row/column counts, and a timestamp. The report contains no original values and is generated entirely in-browser.
- Drag-and-drop or click-to-browse file upload (
.xlsx,.xls,.csv,.txt) - Paste raw CSV or TSV directly from clipboard
- Copy anonymized output to clipboard as CSV
- Export the original → label mapping as CSV or JSON (for traceability)
- Re-anonymize output for additional rounds of obfuscation
- Vault mode progress bar for large datasets
- Multi-sheet Excel support
- Keyboard shortcuts (
Enterto advance,Escapeto go back)
- 100% local — all processing happens in your browser
- No backend, no server, no telemetry
- No data retained between sessions
- No hidden network calls (CDN only for SheetJS and fonts)
- Vault mode warns when running on HTTP (requires HTTPS or localhost for
crypto.subtle)
DataMask is a single self-contained HTML file. No installation, no build step, no dependencies to manage.
Option 1 — Open directly:
Download data_anonymizer.html and open it in any modern browser.
Option 2 — Serve locally (recommended for Vault mode):
# Python 3
python -m http.server 8080
# Then open: http://localhost:8080/data_anonymizer.htmlOption 3 — Clone and open:
git clone https://github.com/mbaffour/datamask.git
cd datamask
open data_anonymizer.html # macOS
start data_anonymizer.html # Windows- Upload — drag & drop a file or paste CSV from clipboard
- Select columns — check which columns to anonymize (numeric, text, or both)
- Choose protection mode — Lite, Strong, or Vault
- Download — export in your preferred format; optionally download the label mapping
Applies one of four simple transformations per selected numeric column:
- Random Noise — adds a ±% delta to each value
- Shuffle — randomly reorders values within the column
- Random Replace — replaces each value with a random value in the column's min/max range
- Scale & Shift — multiplies by a random factor and adds a random offset
Controls: noise intensity, decimal places, sign preservation.
Three-pass pipeline per numeric column:
- Normalize to [0, 1]
- Apply a random sigmoid distortion (
1 / (1 + e^(-k*(v-x0)))) with randomkandx0 - Cross-mix with adjacent selected columns at a configurable blend ratio
- Rescale to a randomized fake output range
All distortion parameters are generated fresh each run and immediately discarded, so recovering the exact original values from the output alone is hard without a reference dataset.
Important limitation: the sigmoid is a monotonic transform, so Strong mode largely preserves the rank order of values within a column. That means the output remains re-identifiable by rank, or by correlating it against a known reference dataset — it is not a substitute for true non-invertible anonymization. When you need synthetic values with no mathematical link to the originals (including no preserved ordering), use Vault mode.
For each numeric cell:
- Compute
SHA-256(userSeed + ":" + colIndex + ":" + rowIndex) - Seed a mulberry32 PRNG with the first 32 bits of the hash
- Generate a synthetic value: either from a normal distribution matching the column's mean/std (shape-preserving), or uniform within the column range
No key is ever stored. Even with full knowledge of the algorithm, all output values, and the column statistics — the originals cannot be recovered.
When text columns are selected, DataMask builds a deterministic mapping of unique original values to sequential labels (SAMPLE_001, SAMPLE_002, …) in order of first appearance. This mapping is:
- Consistent across all rows (the same original value always maps to the same label)
- Applied in all three modes (Lite, Strong, and Vault)
- Exportable as a CSV or JSON file for traceability
Requires a modern browser (Chrome 90+, Firefox 88+, Safari 14+, Edge 90+).
Vault mode requires crypto.subtle, which is available on:
https://originshttp://localhost(local development)
MIT — see LICENSE.
- Configurable label prefix (SAMPLE_, ID_, STRAIN_, …)
- Save and reload anonymization configurations
- Undo/redo history
- Batch file processing
- Reproducible anonymization via exportable seed files
Built with passion for science and discovery.