Pipe JSON through it. Secrets get masked. Nothing leaks.
- Debug logging without leaking tokens
- Sharing API responses with colleagues
- CI pipelines that dump JSON
- Any
curl | jsonmasksituation
# Basic usage
echo '{"user":"admin","password":"supersecret"}' | npx @neocrev/jsonmask
# Mask everything
kubectl get secrets -o json | npx @neocrev/jsonmask -f all
# Custom fields
cat response.json | npx @neocrev/jsonmask -f ssn,credit_card,api_key
# Custom mask character
echo '{"token":"abc123"}' | npx @neocrev/jsonmask -c █# No install needed
npx @neocrev/jsonmask --help
# Or globally
npm install -g @neocrev/jsonmask| Flag | Description | Default |
|---|---|---|
-f, --fields |
Fields to mask (comma-separated or all) |
built-in list |
-i, --file |
Read from file | stdin |
-c, --char |
Mask character | * |
-l, --list |
Show default sensitive fields | |
-h, --help |
Show help |
Runs with 20+ built-in field names: password, secret, token, api_key, jwt, session, cookie, ssn, credit_card and more.
MIT