JSON Anonymizer
: Replace names, emails, dates and numbers in JSON with realistic fake values, keys and layout keptJSON Anonymizer
Make a shareable copy of a real API response, log record or database export: every name, email, phone number, date, ID and free-text string is replaced with a random value of the same kind, while keys, key order, nesting and indentation stay exactly as they were. Useful for bug reports, test fixtures and demo data, and it runs in your browser.
How to anonymize JSON data
- Paste the document into
JSON, pressOpen file, or drop a .json file on the page.Exampleloads a sample order. - In
Quickmode there is nothing to set: every string, number and boolean is replaced as you type, and the info line says how many values of each kind changed. - Switch to
Customto chooseReplace with(realistic values, the same shape, or asterisks), what toChange(strings, numbers or both), and keys or paths toKeep unchangedorChange only, such asstatus, currency, /order/items. - Press
New valuesfor another set of fakes, or type aSeedin Custom mode to get the same output every time. - Press
CopyorDownloadto save the anonymized JSON.
Example
A user record in Quick mode (seed docs). Keys and layout are untouched; null stays null and the boolean stays a boolean.
{
"id": 20417,
"name": "Margaret O'Connell",
"email": "maggie@gmail.com",
"phone": "+61 412 345 678",
"born": "1984-02-29",
"verified": true,
"manager": null
}{
"id": 25439,
"name": "Sami Ingram",
"email": "isla.moreau88@example.com",
"phone": "+13 271 299 647",
"born": "1982-07-02",
"verified": true,
"manager": null
}Details
- Each value's kind comes from its shape first (email, URL, UUID, IP address, date, a Luhn-valid card number, a checksum-valid IBAN, a number) and then from its key:
firstName,last_name,email,phone,city,country,street,company,username,passwordand similar names. - The document is rewritten token by token rather than parsed and printed again, so whitespace, key order, escapes in keys and numbers you keep are exactly as written; a whole number longer than JavaScript can hold is replaced digit by digit, never rounded.
- Types never change: a string stays a string, a number stays a valid number of the same size (digits replaced, sign, decimal point and exponent kept;
0withAsterisks), a boolean staystrueorfalse, andnullis never touched. - Fake emails and URLs use the reserved
example.com,example.organdexample.netdomains, and IP addresses the documentation ranges192.0.2.x,198.51.100.xand203.0.113.x. - With
Same value → same replacementon (always in Quick mode), a repeated value gets the same fake everywhere, so IDs that link objects still match. Keep unchangedandChange onlytake keys or paths separated by commas: a key such ascustomercovers that key anywhere and everything inside it; a path such as/order/customer/emailcovers that value and what is under it. Array positions are not part of a path:/items/skumeans theskuof every item.
Limits
- Kinds are guessed from values and keys. An unusual key can get a generic replacement (letters for letters, digits for digits), and status codes or enum strings are replaced too unless you list them in
Keep unchanged. - Keys are never changed. If a key itself holds personal data (for example an object keyed by email address), it stays visible.
- Fakes are random, not checked against the real world: a generated phone number or name can belong to someone. The structure, counts and kept fields can still identify a record.
- The input must be valid JSON; otherwise the error shows its line and column. Documents over 2 million characters wait for the
Anonymizebutton and run in a background worker.
FAQ
Is my JSON uploaded anywhere?
No. The page rewrites the document in your browser; there is no server step, and the text is not stored.
Will the anonymized JSON still match my schema?
Usually yes: keys, nesting and value types are unchanged and formats such as dates, UUIDs and emails are kept. An enum value can be replaced by a word outside the list, so add that key to Keep unchanged, or check the result with JSON Schema Validator.
How do I get the same fake values every time?
In Custom mode, type any text into Seed. The same seed and document always give the same output.
Can I anonymize XML or CSV the same way?
Yes: XML Anonymizer and CSV Anonymizer use the same detection and fake values.
Runs entirely in your browser. Nothing is uploaded.