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.

Sample flight booking JSON data

This template produces 5 flight bookings. Each booking has a record locator, a passenger name, an airline, a flight number, an aircraft type, departure and arrival airports, a seat and a departure date in 2025. The departure and arrival airports are picked independently, so they can occasionally be the same airport.

Open in JSON Generator

Template

Paste this into the JSON Generator to produce data like the sample below.

{
  "bookings": [
    "repeat(5)",
    {
      "recordLocator": "recordLocator()",
      "passenger": "firstName() lastName()",
      "airline": "airline()",
      "flightNumber": "flightNumber()",
      "aircraft": "aircraftType()",
      "from": "airport()",
      "to": "airport()",
      "seat": "seat()",
      "departure": "date(2025-01-01, 2025-12-31)"
    }
  ]
}

Fields

Fields in the Sample flight booking JSON data template and what each one generates
FieldTemplateWhat it generates
bookings[]repeat(5)An array of 5 items
bookings[].recordLocatorrecordLocator()
  • recordLocator(): Generates a random record locator.
bookings[].passengerfirstName() lastName()
  • firstName(): Generates a random first name.
  • lastName(): Generates a random last name.
bookings[].airlineairline()
  • airline(): Generates a random airline name.
bookings[].flightNumberflightNumber()
  • flightNumber(): Generates a random flight number.
bookings[].aircraftaircraftType()
  • aircraftType(): Generates a random aircraft type.
bookings[].fromairport()
  • airport(): Generates a random airport name.
bookings[].toairport()
  • airport(): Generates a random airport name.
bookings[].seatseat()
  • seat(): Generates a random seat number.
bookings[].departuredate(2025-01-01, 2025-12-31)
  • date(): Generates a random date.

Sample output

The first 2 items of each list from one run of the template. Every click on Generate produces new data.

{
  "bookings": [
    {
      "recordLocator": "ZCYBHD",
      "passenger": "Chesley Welch",
      "airline": {
        "name": "Egyptair",
        "iataCode": "MS"
      },
      "flightNumber": "5118",
      "aircraft": "widebody",
      "from": {
        "name": "Dallas Fort Worth International Airport",
        "iataCode": "DFW"
      },
      "to": {
        "name": "Adolfo Suarez Madrid-Barajas Airport",
        "iataCode": "MAD"
      },
      "seat": "26E",
      "departure": "2025-04-19T22:17:19.461Z"
    },
    {
      "recordLocator": "EJPKKP",
      "passenger": "Zackary Hamill",
      "airline": {
        "name": "Sun Country Airlines",
        "iataCode": "SY"
      },
      "flightNumber": "2914",
      "aircraft": "narrowbody",
      "from": {
        "name": "Adelaide International Airport",
        "iataCode": "ADL"
      },
      "to": {
        "name": "Rio de Janeiro Galeao International Airport",
        "iataCode": "GIG"
      },
      "seat": "13F",
      "departure": "2025-12-23T15:53:46.789Z"
    }
  ]
}

Use cases

  • Build a booking list or boarding pass screen for a travel app prototype.
  • Test code that parses record locators, seat numbers or flight numbers.
  • Mock a booking API response in front-end tests.
  • Create sample data for a travel-related tutorial or demo.

Related

More sample data: User profiles, E-commerce orders, Product catalog, Addresses, Network logs, Employee directory.

See the template tag reference for every tag, browse all examples, or turn your generated data into a contract with the JSON Schema Generator.