JSONGenerator
GeneratorSchemaConvertersExamplesDocs

JSONGenerator

Free online tools for generating random JSON data and JSON Schemas.

Quick Links

  • JSON Generator
  • JSON Schema Converter
  • Examples
  • Docs
  • Blog
  • About
  • Contact
  • Privacy Policy

Converters

  • JSON to YAML
  • YAML to JSON
  • XML to JSON
  • JSON to XML
  • JSON to TOML
  • TOML to JSON
  • JSON to CSV
  • CSV to JSON
  • JSON to Excel
  • Excel to JSON
  • JSON to HTML table
  • JSON to TypeScript
  • JSON to C#
  • JSON to Go
  • JSON to Java
  • JSON to SQL

Support

Having issues? Contact us.

© 2026 JSON Generator. All rights reserved.

Template Tags

Use these tags in your JSON template to generate dynamic data.

⌘K

Free Online JSON Generator

Create random JSON, mock API responses and dummy test data from a template.

JSON Template

Write a JSON template using template tags to generate dynamic data.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
  "result": [
    "repeat(1,2)",
    {
      "message": "Hello, firstName()! Your order number is: #int(1,100)",
      "phoneNumber": "phoneNumber()",
      "phoneVariation": "+90 int(300,399) int(100,999) int(10,99) int(10,99)",
      "status": "enum(active, disabled)",
      "name": {
        "first": "firstName()",
        "middle": "middleName()",
        "last": "lastName()"
      },
      "username": "this.name.first-this.name.last",
      "password": "password()",
      "emails": [
        "repeat(2)",
        "email(gmail.com, example.com)"
      ],
      "location": {
        "street": "street()",
        "city": "city()",
        "state": "state()",
        "country": "country()",
        "zip": "zipCode()",
        "coordinates": {
          "latitude": "latitude()",
          "longitude": "longitude()"
        }
      },
      "website": "url()",
      "domain": "domainName()",
      "job": {
        "title": "jobTitle()",
        "descriptor": "jobDescriptor()",
        "area": "jobArea()",
        "type": "jobType()",
        "company": "companyName()"
      },
      "creditCard": {
        "number": "creditCardNumber()",
        "cvv": "creditCardCVV()",
        "issuer": "creditCardIssuer()"
      },
      "uuid": "guid()",
      "objectId": "objectId()"
    }
  ]
}

Generated Output

The generated JSON data based on your template.

1

Ready to generate

What is JSON Generator?

JSON Generator is a free online tool for creating random JSON data. Instead of typing test data by hand, you write a JSON template that describes the shape you want and drop in template tags like firstName() or int(1, 100). Each time you click Generate, every tag is replaced with realistic fake data, so you get valid, ready-to-use JSON in seconds.

Developers use it as a mock data generator for APIs, testers use it to make dummy JSON for fixtures, and writers use it to produce sample JSON files for docs and tutorials.

How to generate random JSON data

  1. Write a template in the JSON Template editor, or start from one of the ready-made examples.
  2. Add tags from the sidebar for the values you need. The template tag reference lists every tag with its options.
  3. Click Generate to create the JSON.
  4. Copy the output, or download it as a JSON, CSV or YAML file.

Example: generate a list of users

This template produces an array of two user objects. Change repeat(2) to repeat(300) for a larger dataset (up to 300 items per array).

Template

[
  "repeat(2)",
  {
    "id": "guid()",
    "name": "firstName() lastName()",
    "email": "email(example.com)",
    "age": "int(18, 65)",
    "status": "enum(active, disabled)"
  }
]

Example output

[
  {
    "id": "612b1152-2a11-46d9-8df4-146100e8a600",
    "name": "Flossie Hahn",
    "email": "Ross23@example.com",
    "age": 27,
    "status": "active"
  },
  {
    "id": "0021e188-47e4-4454-b2ff-017f8e4f45db",
    "name": "Valentin Homenick",
    "email": "Russ69@example.com",
    "age": 36,
    "status": "disabled"
  }
]

What you can use it for

  • Mock API responses: Build realistic JSON payloads for front-end work before the backend exists, or to stub endpoints in tests.
  • Dummy test data: Generate hundreds of records with names, emails, addresses, dates and IDs to seed a test database or fixture file.
  • Sample JSON files: Create a sample JSON file for documentation, tutorials or bug reports, then download it with one click.
  • Load and edge-case testing: Use repeat() to produce large arrays and enum() or int() ranges to cover the values your code has to handle.

For a worked example, see seeding test databases in CI/CD.

Features

  • 50+ template tags: Names, emails, phone numbers, addresses, coordinates, companies, products, prices, GUIDs, ObjectIds, IPs, dates and more.
  • Arrays of any length: repeat(10) or repeat(5, 20) turns one object into a list of random records.
  • Field references: Reuse generated values elsewhere in the object, such as building a username from first and last name.
  • Export to JSON, CSV or YAML: Copy the result or download it as a .json, .csv or .yaml file.
  • Private by default: Generation runs in your browser and your template is saved in local storage, so nothing is uploaded and it is still there next time.
  • Free, no sign-up: Open the page and start generating.

Every result is standard JSON (RFC 8259), so it works with any language, framework or tool.

More JSON tools

  • JSON Schema Generator: convert JSON (or a generated sample) into a JSON Schema.
  • Sample JSON templates: users, orders, products, addresses, flights, logs and employees.
  • Blog: guides such as what mock JSON data is and how to generate it, YAML vs JSON and Protobuf vs JSON.

Frequently Asked Questions

What is a JSON generator?

A JSON generator creates JSON data for you instead of you typing it by hand. JSONGenerator.io works from a template: you describe the shape of the JSON and use template tags such as firstName(), email() or int(1, 100) where you want random values. Each time you click Generate, the tags are replaced with realistic fake data.

How do I generate random JSON data?

Write or paste a JSON template in the left editor, add template tags from the sidebar for the values you need, then click Generate. The random JSON appears in the output editor, where you can copy it or download it.

How do I generate an array of JSON objects?

Put "repeat(n)" as the first item of an array, followed by the object you want repeated. For example ["repeat(10)", {"id": "guid()"}] produces ten objects, and repeat(5, 20) picks a random length between 5 and 20. An array can hold up to 300 items.

Can I create and download a JSON file?

Yes. After generating, use the download button above the output to save the data as a .json file. You can also download it as CSV or YAML.

Can I use it to mock API responses or dummy test data?

Yes. That is the most common use. Shape the template like your API response or database table and generate as many records as you need for front-end prototypes, unit tests, fixtures or seeding a test database.

What kinds of fake data can it generate?

There are over 50 template tags, covering names, usernames, emails, passwords, phone numbers, addresses, coordinates, countries, companies and job titles, products and prices, fake credit card numbers, GUIDs and ObjectIds, IP addresses, URLs, dates, numbers and custom enums. See the template tag reference in the Docs for the full list.

Is the generated JSON valid?

Yes. The output is standard JSON as defined by RFC 8259 and ECMA-404, so it can be parsed by any language or tool.

Is my data uploaded or stored?

No. Generation runs entirely in your browser. Your template is saved in your browser's local storage so it is still there when you come back, but it is not sent to our servers.

Is JSONGenerator free?

Yes. It is free to use and does not require an account.

Can I get a JSON Schema for my data?

Yes. Paste your JSON (or a template) into the JSON Schema Generator and click Convert to get a matching JSON Schema.

How can I report a problem or suggest a feature?

Use the Contact page to send us a message. We read every suggestion.