JSON Obfuscator

Renames every object key to a generic k1, k2... name and scrambles string and number values, while keeping the document's overall shape and types intact, useful for sharing a realistic-looking sample without real data or naming. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

Sometimes you need a JSON sample that looks and feels like real data, for a demo, a test fixture, or a bug report, but without exposing actual user data or your application's real field names.

This tool renames every key to a generic k1, k2... label and scrambles string and number values, producing a document with the same shape, nesting, and data types as the original, but none of its real content.

What Is JSON Obfuscator?

An obfuscator that walks a JSON document, replaces every object key with a generic sequential name, and scrambles the characters of every string value and randomizes every number, while leaving the overall structure, key repetition patterns, and value types intact.

The same original key always maps to the same obfuscated name across the whole document, so structural relationships (which keys repeat, which are unique) remain visible.

How JSON Obfuscator Works

As the tool walks the document, it maintains a map from original key name to generated name (k1, k2, ...), assigning a new name only the first time each key is seen and reusing it on every subsequent occurrence.

String values are scrambled by shuffling their characters using a seeded pseudo-random generator (seeded from the string itself, so results are deterministic), and numbers are replaced with a random value of similar magnitude (same digit count).

When To Use JSON Obfuscator

Use it when preparing a realistic-looking JSON sample for a demo, a blog post, or a support ticket without exposing real field names or data.

It's also useful for generating obfuscated test fixtures that preserve a document's shape and type distribution for testing serialization code.

Features

Advantages

  • Keeps the same key mapped consistently throughout the whole document.
  • Deterministic scrambling means the same input always produces the same output, useful for repeatable tests.
  • Preserves types and rough numeric magnitude, so the result still looks structurally plausible.

Limitations

  • Scrambled strings are shuffles of the original characters, not entirely new text, so character frequency (and thus rough content type) can still leak.
  • This is obfuscation, not cryptographic anonymization; don't rely on it for strong privacy guarantees.

Examples

Obfuscating a small object

Input

{"username":"ada.lovelace","age":36,"active":true}

Output

{
  "k1": "aavd.eoellac",
  "k2": 47,
  "k3": true
}

Keys become sequential generic names, the string's characters are shuffled, the number is replaced with one of similar magnitude, and the boolean is left as-is.

Best Practices & Notes

Best Practices

  • Don't rely on this for protecting genuinely sensitive data; use it for demos and fixtures, not compliance-grade anonymization.
  • If you need real, unrecoverable redaction, use Hide JSON Strings or Censor JSON Data instead.
  • Keep the key mapping in mind: repeated keys across a document stay linked even after obfuscation.

Developer Notes

Both the key-name map and the character-scrambling routine are seeded deterministically (a simple FNV-1a-style hash of the string feeds a mulberry32 PRNG), which trades true randomness for reproducibility, useful when comparing obfuscated output across multiple runs of the same input during testing.

JSON Obfuscator Use Cases

  • Preparing a realistic-looking demo payload without real field names or data
  • Generating obfuscated test fixtures that preserve type and shape
  • Sharing a document's structure publicly without its actual content or naming

Common Mistakes

  • Treating this as a security-grade anonymization technique for genuinely sensitive data.
  • Expecting scrambled strings to be unrelated to the original; they're character shuffles of the same text, not freshly generated text.
  • Losing track of which generic key corresponds to which original field when sharing the obfuscated output alongside code that expects the original names.

Tips

  • Run the same input twice to confirm the deterministic output before relying on it in a repeatable test.
  • Use Hide JSON Strings instead if character-level content (even shuffled) is too much to expose.

References

Frequently Asked Questions