About sqlmask
It exists to stop real customer phone numbers travelling around inside test copies of production dumps.
What it does
Paste SQL (INSERT, UPDATE, VALUES, COPY), CSV (RFC 4180) or JSONL and sqlmask finds emails, phones, cards, Korean resident numbers and IP addresses, then rewrites only those values. The structure stays intact, so the result can be loaded back into a database or used as a fixture.
Four modes: partial masking, deterministic pseudonyms, full redaction and format-preserving dummies. Deterministic pseudonyms keep the same value mapped to the same output so joins across tables still work.
Why only in the browser
A dump holds real personal data, and pasting it into an online tool sends it to someone else's server. This tool removes that path: no server code, no upload endpoint, no account.
Everything runs in this page's JavaScript. SHA-256 and HMAC are implemented locally, so no external library is loaded.
Scope
The formats and rules below are supported. Anything else may be missed, so reviewing the output is part of the workflow.
- SQL: INSERT … VALUES, UPDATE … SET, standalone VALUES, and the tab-separated data block after PostgreSQL COPY … FROM stdin. Strings, comments and dollar quoting are distinguished.
- CSV: comma, semicolon, tab or pipe delimiter detection, quoted commas and line breaks, optional header.
- JSONL: one JSON value per line, nested objects and arrays handled by path.
- Patterns: email, Korean and international phone numbers, cards (optional Luhn), Korean resident and foreigner numbers (optional checksum), IPv4, IPv6, custom regex.
- Column-name rules: email, phone, rrn, card_no, ip_addr, full_name, address, password, birth, user_id and more.
- Transforms: partial mask, HMAC-SHA-256 pseudonym, full redaction, format-preserving dummy.
Limits
Detection is not complete. Unseen formats and unremarkable column names are missed, and an order number can look like a card number.
SQL support covers INSERT, UPDATE, VALUES and COPY. SELECT, DDL and stored procedures are untouched, and personal data inside comments is left alone — check before sharing.
Back to the anonymiser