Get the App

How to Generate Sample JSON Test Data on Android

The Problem: Getting Test Data Shouldn't Require a Laptop

You need a large JSON file to test a parser. Or a few thousand records to try some filter logic. Or structured data to demo a feature.

On desktop, you'd use an online generator or write a script. On your phone, options are slim. Most online generators cap at a few megabytes, require an account, and upload your data to a cloud service.

GiantJSON Viewer+ includes a built-in sample JSON generator that runs entirely on your device. No internet, no uploads, no account, and no ads. It's a free feature — no Pro subscription needed.

Two Modes: Templates and Schema

The generator offers two approaches:

Templates — 12 built-in data structures covering common domains. Pick one, set your size and format, and generate. A live preview shows what a single record looks like before you commit.

Schema — provide your own JSON Schema file. The generator validates it, then produces records that follow the defined structure and types.

Templates use domain-specific value types (emails, addresses, timestamps in the right places), so the output tends to look more plausible. Schema-based generation follows your structure but fills fields with random values unless you provide specific constraints — more on that below.

12 Built-in Templates

Each template defines a set of fields with appropriate value types — email fields generate email-formatted strings, phone fields produce formatted numbers, timestamp fields output ISO 8601 dates. Names, cities, and other text values are picked randomly from built-in word lists.

Template Description Depth
Users / People Profiles with name, email, nested address, phone 2
Products / E-commerce Catalog with pricing, categories, specs 2-3
Server Logs Log entries with levels, service names, request IDs 1-2
API Responses REST envelopes with data arrays, pagination 3-4
Configuration Nested settings, database pools, feature flags 4-5
Financial Transactions Payment records with sender/receiver, currencies 2-3
IoT Sensor Data Device telemetry with GPS, signal, battery 1-2
Social Media Posts Posts with author, comments, hashtags 3-4
Healthcare Records Patient records, diagnoses, medications, vitals 3-4
Inventory / Warehouse Stock with SKUs, locations, suppliers 2-3
Event / Analytics Tracking events with user, device, geo context 2-3
Enterprise CRM (Deep) Organizations, departments, teams, goals — up to 15 levels deep 10-15

The Enterprise CRM template is useful for testing how tools handle deeply nested JSON.

Schema-Based Generation — With a Caveat

If you have an existing JSON Schema, you can feed it to the generator:

  1. Switch to the Schema tab
  2. Select a .json schema file
  3. The generator validates it and reports property count, max depth, and any warnings
  4. Configure size and format, then generate

Supported schema features: $ref (local), allOf/oneOf/anyOf, const, enum, format hints (date-time, email, uuid, uri, ipv4, phone, hostname), minimum/maximum, minLength/maxLength, minItems/maxItems, and required tracking.

Important caveat: the generator produces valid JSON that matches your schema's structure and types, but it does not understand what your fields mean. A string field named "company_name" might get a random word sequence. A field named "id" might get a sentence. The app shows this warning upfront.

The more constraints your schema includes (enums, formats, const values), the more useful the output becomes. For unconstrained string fields, expect random text.

Size and Format

Target size: 1 MB to 100 GB (predefined steps or custom).

Record limit: None, 100, 1K, 10K, 100K, 1M, 10M, or custom up to 100M. Stops at whichever limit is reached first.

Output formats:

  • Pretty — indented, human-readable JSON array
  • Minified — compact JSON array, no whitespace
  • JSONL — one object per line, no array wrapper (line-delimited)

Streaming, Not Buffering

The generator writes directly to disk through a buffered writer — records never accumulate in memory. That's how it can produce files much larger than the device's available RAM.

The app checks free storage before starting and warns if it looks tight. You can cancel at any point — the partial file remains valid up to the last complete record.

Known Limitations

  • Schema file size: max 25 MB
  • Max nesting depth: 250 levels
  • $ref chain depth: max 5 levels, circular references detected and warned
  • Per-record cap: records over 10 MB are skipped (safety against pathological schemas)
  • Storage checks: blocked if free space < 1.1x target, warning if < 1.5x
  • No pattern support: regex patterns in schema are not used for value generation
  • No if/then/else: conditional schema keywords not supported

Frequently Asked Questions

Is there a JSON test data generator app for Android?

GiantJSON Viewer+ includes a built-in generator with 12 templates and JSON Schema support. Runs offline, up to 100 GB. Free, no ads.

Can I generate JSON from a JSON Schema on my phone?

Yes. The generator follows the schema's structure and types. Note that unconstrained fields get random values rather than contextually meaningful data.

How large of a JSON file can I generate on Android?

Up to 100 GB. Data streams directly to disk, so the limit is your storage space, not RAM.

Is the generated data realistic?

Templates use appropriate value types per field (email-formatted strings, ISO timestamps, formatted phone numbers, etc.) but values are randomized from word lists. Schema-based generation follows the defined structure but unconstrained fields get random values.

Does it cost anything?

No, it's free with no ads.

Generate Test Data On Your Phone

12 templates, JSON Schema support, up to 100 GB — free, offline.

Get Giant JSON Viewer