Tools

Home
Password GeneratorLorem IpsumCoin FlipperRandom StringToken GeneratorRandom Color

Random JSON Generator

Generate random JSON data with configurable structure, depth, key count, and value types

Your files never leave your browser
Keys:0
Depth:0
Size:0
Ready·Client-side generation

Set the depth, keys per object, and value types you want — then hit generate. You get valid, pretty-printed JSON with random strings, numbers, booleans, and nested structures, ready to copy or save as a .json file.

And everything runs in your browser. Nothing gets uploaded.

How It Works

Configure Structure
➞
Generate Random Values
➞
Copy or Download JSON

You pick the rules — max nesting depth, keys per level, array sizes, and which value types are fair game. The tool walks through each level, randomly generating keys and values that match your settings. Strings get random words, numbers are random integers or decimals, and booleans flip a coin. The result is always valid JSON, formatted with 2-space indentation so it’s actually readable.

Examples

Flat object for a quick mock response

You need a simple API stub — no nesting, just key-value pairs with mixed types.

INPUT
Depth: 1 Keys: 4 Types: string, number, boolean
OUTPUT
{ "alpha": "lorquet", "beta": 847, "gamma": true, "delta": 3.14 }

Nested structure for parser stress testing

Your JSON parser claims it handles arbitrary depth. Time to find out. Depth 4, arrays included, all value types on.

INPUT
Depth: 4 Keys: 3 Array max: 5 Types: all enabled
OUTPUT
{ "user": { "profile": { "tags": [true, 42, "xkp"], "score": null }, "active": false }, "items": [{"id": 991}, 7], "meta": "rndval" }

Numbers-only payload for load testing

You just need a bunch of numeric values to throw at a data pipeline. Nothing fancy.

INPUT
Depth: 2 Keys: 5 Types: number only
OUTPUT
{ "alpha": 204, "beta": { "x": 88.7, "y": 1023, "z": 0.45 }, "gamma": 17, "delta": 562, "epsilon": 3 }

Who Uses This

👨‍💻 Backend Developers

Generate mock payloads for API endpoint testing without writing fixtures by hand.

📊 QA Engineers

Create edge-case JSON with deep nesting and mixed types to break parsers on purpose.

🎓 Students

Get sample JSON data for class projects and homework without copying from Stack Overflow.

🚀 Frontend Developers

Prototype UI components with realistic-looking data before the real API exists.

Common Mistakes

Disabling all value types before generating

If every type checkbox is unchecked, there’s nothing to fill the values with. The tool will show an error. Make sure at least one type — string, number, boolean, null, array, or object — stays enabled.

Setting depth to 5 with 20 keys and expecting a small file

High depth + lots of keys = exponential growth. A depth-5 structure with 20 keys per level can produce tens of thousands of lines. Start small (depth 2, 3–5 keys) and work up.

Assuming the output matches a specific schema

This generator creates random structures, not schema-conformant data. If you need JSON that matches a particular API contract, you’ll have to adjust the output manually or write a custom template.

Technical Details

Frequently Asked Questions

How do I generate random JSON data?

Set the depth, key count, and array length at the top of the tool. Toggle on the value types you want (strings, numbers, booleans, etc.), then click Generate. The JSON appears instantly in the output box — copy it or download it as a file.

Is randomly generated JSON valid?

Yes. The output follows the JSON specification exactly — proper quoting, commas, brackets, the works. You can paste it into any JSON validator or parser and it will pass without errors.

Can I control which data types appear in the output?

Each type has its own toggle — string, number, boolean, null, array, and nested object. Turn off what you don’t need. Want numbers only? Disable everything else. The generator respects whatever combination you pick.

Does this tool upload my data to a server?

No. Everything runs in your browser using JavaScript. No data is sent to any server, nothing gets logged, and closing the tab erases everything. It is as private as it gets for a web tool.

What is the maximum size of JSON I can generate?

Depth caps at 5 and keys per object at 20. In practice, a maxed-out configuration can produce several kilobytes of JSON. For most testing needs that’s plenty. If you need massive files, generate multiple times and combine the results.

Share: