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.

  • Generators
  • Identity & Personal
  • Location & Contact
  • Work & Organization
  • Commerce & Finance
  • Travel
  • Internet & Media

Template tag reference

Tags are strings inside your JSON template, like "firstName()". Each one is replaced with generated data. A tag can be a whole value or sit inside text, and repeat() goes first in an array to repeat the item after it.

Use them in the JSON Generator to build random test data, or start from one of the sample JSON templates. Optional arguments are marked with ?.

Field references

this.fieldName reuses a value generated earlier in the same object, so related fields stay consistent. Fields are generated in order, so the referenced field must come first. For example, "fullName": "this.firstName this.lastName" always matches the record's first and last name.

Nested objects and arrays can also reference fields of the object that contains them: inside an order's line items, "orderId": "this.id" gives the parent order's id. A value that is only a reference keeps the referenced value's type; a reference inside other text is inserted as text.

Generators

repeat(min?, max?)

Use as the first item of an array to repeat the item after it. repeat() picks a random count from 1 to 100, repeat(n) repeats it exactly n times, and repeat(min, max) picks a random count in that range. The count is capped at 300.

Example usage

  • repeat( )
  • repeat( 5)
  • repeat( 1, 5)

int(min?, max?)

Generates a random integer value. Supports optional arguments to specify a range. Used as the whole value it returns a number; inside other text it is inserted as text.

Example usage

  • int( )
  • int( 1, 100)
  • int(4)

Example output

  • 34534
  • 56
  • 4

date(start?, end?)

Generates a random date. Supports optional arguments to specify a date range.

Example usage

  • date( )
  • date( "2022-01-01", "2022-12-31")

Example output

  • 1979-04-05T07:23:11.051Z
  • 2022-07-15T12:43:51.926Z

double(min?, max?, precision?)

Generates a random double value. Supports optional arguments to specify a range and precision. Used as the whole value it returns a number.

Example usage

  • double( )
  • double( 0, 1, 4)

Example output

  • 34645.23
  • 0.4321

enum(value1, value2, ...)

Generates a random value from the list of arguments. true, false, null and numbers are returned as JSON values.

Example usage

  • enum(true, false)
  • enum(blue, red, green, black)

Identity & Personal

email(tld1?, tld2?, ...)

Generates a random email address. Supports an optional argument to specify a domain.

Example usage

  • email( )
  • email(gmail)
  • email(example, test, foo)

Example output

  • john.doe@example.com

guid()

Generates a globally unique identifier ( UUID v4).

Example output

  • 6a1f9a14-9eeb-4f9c-9df3-b845fc1c7230

objectId()

Generates an ObjectId string which is commonly used with MongoDB.

Example output

  • 60e32795b87f73644c9f9f1d

firstName()

Generates a random first name.

Example output

  • John

middleName()

Generates a random middle name.

Example output

  • Robert

lastName()

Generates a random last name.

Example output

  • Doe

userName()

Generates a random username.

Example output

  • john_doe123

password()

Generates a random password.

Example output

  • p@$$w0rd

Location & Contact

street()

Generates a random street address.

Example output

  • 123 Elm Street

city()

Generates a random city name.

Example output

  • San Francisco

state()

Generates a random state name.

Example output

  • California

country()

Generates a random country name.

Example output

  • United States

zipCode()

Generates a random ZIP code.

Example output

  • 94117

latitude()

Generates a random latitude coordinate.

Example output

  • 37.7749

longitude()

Generates a random longitude coordinate.

Example output

  • -122.4194

phoneNumber()

Generates a random phone number.

Example output

  • ( 555) 555-5555

Work & Organization

companyName()

Generates a random company name.

Example output

  • Acme Corp

jobTitle()

Generates a random job title.

Example output

  • Software Engineer

jobDescriptor()

Generates a random job descriptor.

Example output

  • Lead

jobArea()

Generates a random job area.

Example output

  • Engineering

jobType()

Generates a random job type.

Example output

  • Full-time

department()

Generates a random department name.

Commerce & Finance

creditCardNumber()

Generates a random credit card number.

Example output

  • 4111111111111111

creditCardCVV()

Generates a random credit card CVV.

Example output

  • 123

creditCardIssuer()

Generates a random credit card issuer.

Example output

  • Visa

productName()

Generates a random product name.

productAdjective()

Generates a random product adjective.

productMaterial()

Generates a random product material.

productDescription()

Generates a random product description.

product()

Generates a random product name.

price()

Generates a random price.

isbn()

Generates a random ISBN.

Travel

airline()

Generates a random airline name.

aircraftType()

Generates a random aircraft type.

airport()

Generates a random airport name.

airplane()

Generates a random airplane name.

flightNumber()

Generates a random flight number.

recordLocator()

Generates a random record locator.

seat()

Generates a random seat number.

Internet & Media

url()

Generates a random URL.

Example output

  • https://www.example.com

domainName()

Generates a random domain name.

Example output

  • example.com

image()

Generates a random image URL.

ip()

Generates a random IP address.

ipv6()

Generates a random IPv6 address.

ipv4()

Generates a random IPv4 address.

More questions? See the FAQ or the blog.