How to strip pii fields from json for gdpr compliance
- Step 1Drop in the JSON export — Drag a
.jsonfile onto the dropzone (or click to browse). The tool reads the file in your browser; nothing uploads. Free accounts can process files up to 2 MB — split larger dumps or upgrade to Pro for bigger files. - Step 2List the PII keys to remove — Type the field names into Keys (comma-separated) — e.g.
email, phone, firstName, lastName, dateOfBirth, ip, postalCode. Surrounding spaces are trimmed, soemail, phoneandemail,phonebehave identically. - Step 3Choose Remove listed — Click Remove listed (the default mode). The keys you typed are the ones that get dropped; everything else is preserved. The alternative, Keep listed, is a whitelist mode covered on the public-API page — for PII removal you want a blacklist, so stay on Remove.
- Step 4Keep Deep (all levels) on — Leave the Deep (all levels) checkbox ticked (it is on by default). Deep mode walks into nested objects and array elements so PII is removed wherever it hides. Untick it only if you deliberately want to strip top-level keys but leave nested objects untouched.
- Step 5Run the filter — Click Filter Keys. The button stays disabled until you have both a file and at least one key. The result panel shows the rewritten JSON plus a
N keys removedcount. - Step 6Verify and export — Scan the preview (it shows the first 5,000 characters for large outputs), confirm the PII keys are gone, then Copy or Download the
.filtered.json. For irreversible scrambling of values you must keep, send the result through the JSON Anonymizer next.
What Remove mode does to common PII keys
Behaviour with mode = Remove listed and Deep = on. Matching is exact and case-sensitive — only the literal key strings you list are removed.
| Key you list | Removed where | Left untouched | Note |
|---|---|---|---|
email at any depth | userEmail, Email, emailVerified | Substring/variants are not matched — list each variant explicitly. | |
| phone | phone in every object and array element | phoneNumber, mobile | Add phoneNumber, mobile if your data uses those. |
| ip | ip everywhere | ipAddress, client_ip | Snake/camel variants must be listed separately. |
| dateOfBirth | dateOfBirth at all levels | dob, birthDate | Different schemas name this differently — check yours first. |
| (key absent) | nothing | everything | If a listed key does not exist, it is a silent no-op; keysAffected stays 0 for it. |
Deep on vs Deep off
The Deep (all levels) checkbox decides how far the filter walks. For GDPR removal you almost always want Deep on.
| Setting | Top-level keys | Nested objects / array elements | Use when |
|---|---|---|---|
| Deep on (default) | Filtered | Filtered recursively | PII may be nested (e.g. user.contact.email) — the normal case. |
| Deep off | Filtered | Left exactly as-is | You only want to drop a top-level wrapper key and keep its subtree intact. |
Cookbook
Real-shaped records with PII keys removed. All values below are synthetic; this is what the before/after looks like in the result panel.
Strip email and phone from a flat user array
ExampleThe everyday case: a list of user records where each carries an email and phone you do not need downstream. Keys: email, phone, mode Remove, Deep on.
BEFORE
[
{ "id": 1, "name": "Ada", "email": "ada@x.com", "phone": "+1-555-0100", "plan": "pro" },
{ "id": 2, "name": "Bo", "email": "bo@x.com", "phone": "+1-555-0101", "plan": "free" }
]
AFTER (4 keys removed)
[
{ "id": 1, "name": "Ada", "plan": "pro" },
{ "id": 2, "name": "Bo", "plan": "free" }
]Remove a nested email three levels deep
ExampleDeep mode means you list the key once even when it is buried inside nested objects. Keys: email, Deep on.
BEFORE
{
"order": {
"id": "A-91",
"customer": { "name": "Ada", "contact": { "email": "ada@x.com", "zip": "90210" } }
}
}
AFTER (1 key removed)
{
"order": {
"id": "A-91",
"customer": { "name": "Ada", "contact": { "zip": "90210" } }
}
}Drop several PII fields at once
ExampleList every PII key you need gone in one comma-separated string. Keys: firstName, lastName, email, phone, dateOfBirth.
BEFORE
{ "firstName": "Ada", "lastName": "L", "email": "a@x.com",
"phone": "555-0100", "dateOfBirth": "1990-12-10", "country": "US", "tier": "gold" }
AFTER (5 keys removed)
{ "country": "US", "tier": "gold" }Listed key that does not exist is a no-op
ExampleIf you misspell a key or it simply is not present, nothing breaks — that key contributes 0 to the removed count. Keys: email, e-mail.
BEFORE
[ { "id": 1, "email": "a@x.com" } ]
AFTER (1 key removed — `e-mail` matched nothing)
[ { "id": 1 } ]Deep off leaves nested PII in place
ExampleTurning Deep off only touches the top level — a reminder of why you keep it on for GDPR. Keys: email, Deep OFF.
BEFORE
{ "email": "top@x.com", "profile": { "email": "nested@x.com" } }
AFTER (1 key removed — nested email survives because Deep is off)
{ "profile": { "email": "nested@x.com" } }Errors and edge cases
Real errors and silent failures sourced from each platform's own documentation. Match the wording to the row, fix what the row says to fix.
Input is not valid JSON
Invalid JSONThe tool runs JSON.parse on the file first. A trailing comma, single quotes, an unquoted key, or a truncated download throws a parse error and nothing is filtered. Run the file through the JSON Format Fixer or JSON Validator first, then come back.
Key name has different casing
Not removedMatching is case-sensitive. Listing email will not remove Email or EMAIL. If your records mix casing, list every casing variant (email, Email, EMAIL) explicitly.
PII is a substring of a larger key
PreservedListing email removes only the exact key email. Keys like userEmail, email_verified, or billingEmail are kept. List those exact names too if they also hold PII.
Listed key is absent from the data
By designA key you list that never appears is silently ignored — no error, and it adds 0 to keysAffected. Use the removed-count to confirm the keys you cared about actually matched.
PII value remains in a different field
PreservedThis tool removes whole keys, not values. An email embedded inside a free-text notes string, or stored under an unlisted key, is left in place. Add that key to your list, or scrub free-text separately.
File exceeds the free 2 MB limit
BlockedFree accounts are capped at 2 MB per JSON file. A larger export is blocked before processing. Split the dump into chunks or upgrade to Pro for larger files.
Run button stays disabled
ExpectedFilter Keys is disabled until you have both loaded a file and entered at least one key. An empty keys box means there is nothing to remove, so the run is not offered.
Output indentation is fixed at 2 spaces
By designThe filtered JSON is always pretty-printed with 2-space indentation; there is no minify or custom-indent control here. To compact it afterwards, pass the result through the JSON Minifier.
Array order and non-PII fields
PreservedArray element order and every key you did not list are kept exactly as-is. Only the listed keys are dropped; the rest of the structure is untouched.
Frequently asked questions
Does this make my data GDPR-compliant on its own?
It performs data minimisation by removing the PII keys you specify, which supports Article 5(1)(c). Full compliance also depends on your lawful basis, retention, and processing records — this tool handles one concrete step: getting named PII fields out of a JSON document.
Is my data uploaded anywhere?
No. The file is parsed, filtered, and re-serialised entirely in your browser tab. The raw PII never reaches a server, which is itself helpful for minimisation.
Does it remove keys at every nesting level?
Yes, when Deep (all levels) is on (the default). It walks into nested objects and into each element of arrays, removing the listed keys wherever they appear.
Is matching case-sensitive?
Yes. email and Email are different keys. List each casing variant you need removed.
Will it catch userEmail if I list email?
No. Matching is exact, not substring. List userEmail separately if it also holds PII.
What does the removed-count mean?
It is the total number of key occurrences that were stripped across the whole document — e.g. removing email from 200 records reports 200. It is a useful sanity check that the strip actually hit your data.
Can I remove the value but keep the key (e.g. set email to null)?
No — this tool removes the whole key/value pair. If you need to keep the key but mask or scramble the value, use the JSON Anonymizer instead.
What if my JSON is invalid?
Parsing fails and nothing is filtered. Fix it with the JSON Format Fixer or check it with the JSON Validator first.
How big a file can I process for free?
Up to 2 MB per JSON file on a free account. Larger files require Pro or splitting the input.
Can I keep only certain fields instead of removing PII?
Yes — switch to Keep listed (whitelist) mode, though it behaves differently on nested data. See the public-API subset guide for how whitelisting works here.
Does it change the order of my records or remaining fields?
No. Array order and every unlisted key are preserved exactly; only the listed keys are removed.
What format is the download?
A .filtered.json file, pretty-printed with 2-space indentation. You can also copy the result to your clipboard.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.