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 JSON data and converter examples

Need sample JSON or dummy JSON data for an API mock, a test fixture or a tutorial? Start from a generator template, or open any converter with a ready-made example to see exactly what it produces. Every example opens in the tool, where you can edit it, then copy or download the result.

JSON generator templatesData format convertersSpreadsheet and table convertersJSON to code

JSON generator templates

Templates for the JSON Generator. Each click of Generate produces a new set of realistic records you can download as JSON, CSV or YAML. Select a template name to see its fields and sample output on its own page.

User profiles

Accounts with names, contact details, login and address.
{
  "users": [
    "repeat(5,10)",
    {
      "id": "guid()",
      "firstName": "firstName()",
      "lastName": "lastName()",
      "username": "this.firstName-this.lastName",
      "email": "email(gmail.com, example.com)",
      "password": "password()",
      "phone": "phoneNumber()",
      "active": "enum(true, false)",
Use template

E-commerce orders

Orders with customers, line items, totals and status.
{
  "orders": [
    "repeat(3,8)",
    {
      "orderId": "objectId()",
      "status": "enum(pending, paid, shipped, delivered, refunded)",
      "placedAt": "date(2024-01-01, 2025-12-31)",
      "customer": {
        "name": "firstName() lastName()",
        "email": "email()"
      },
      "items": [
Use template

Product catalog

Products with names, materials, prices and stock.
{
  "products": [
    "repeat(10)",
    {
      "sku": "guid()",
      "name": "productName()",
      "description": "productDescription()",
      "material": "productMaterial()",
      "department": "department()",
      "price": "price()",
      "inStock": "int(0,500)",
      "image": "image()",
Use template

Addresses

Postal addresses with coordinates.
{
  "addresses": [
    "repeat(10)",
    {
      "street": "street()",
      "city": "city()",
      "state": "state()",
      "zip": "zipCode()",
      "country": "country()",
      "coordinates": {
        "latitude": "latitude()",
        "longitude": "longitude()"
Use template

Flight bookings

Bookings with airline, flight number, airport and seat.
{
  "bookings": [
    "repeat(5)",
    {
      "recordLocator": "recordLocator()",
      "passenger": "firstName() lastName()",
      "airline": "airline()",
      "flightNumber": "flightNumber()",
      "aircraft": "aircraftType()",
      "from": "airport()",
      "to": "airport()",
      "seat": "seat()",
Use template

Network logs

Request logs with IPs, URLs, status codes and latency.
{
  "logs": [
    "repeat(20)",
    {
      "id": "guid()",
      "timestamp": "date(2025-01-01, 2025-12-31)",
      "clientIp": "ipv4()",
      "clientIpv6": "ipv6()",
      "host": "domainName()",
      "url": "url()",
      "method": "enum(GET, POST, PUT, DELETE)",
      "status": "enum(200, 201, 301, 400, 404, 500)",
Use template

Employee directory

Staff with job titles, departments and companies.
{
  "employees": [
    "repeat(8)",
    {
      "id": "int(1000,9999)",
      "name": "firstName() middleName() lastName()",
      "title": "jobTitle()",
      "area": "jobArea()",
      "type": "jobType()",
      "department": "department()",
      "company": "companyName()",
      "website": "url()"
Use template

Data format converters

Move data between JSON and the other text formats used for configuration and data exchange.

JSON to YAML

Convert JSON to clean, readable YAML for config files, Kubernetes and CI pipelines.
{
  "service": "orders-api",
  "replicas": 3,
  "enabled": true,
  "region": "NO",
  "image": {
    "repository": "ghcr.io/acme/orders",
    "tag": "1.10"
  },
  "ports": [80, 443],
  "env": [
    { "name": "LOG_LEVEL", "value": "info" },
Try JSON to YAML

YAML to JSON

Convert YAML, including anchors and multi-document files, to formatted JSON.
# Deployment config with shared defaults
defaults: &defaults
  replicas: 2
  region: NO
  enabled: yes

service:
  <<: *defaults
  name: orders-api
  image: ghcr.io/acme/orders:1.10
  ports: [80, 443]
  env:
Try YAML to JSON

XML to JSON

Convert XML to JSON with attributes, repeated elements and text nodes mapped predictably.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Comments and the declaration are dropped -->
<order id="A-1042" status="paid" xmlns:inv="urn:example:inventory">
  <customer>
    <name>Ada Lovelace</name>
    <zip>02134</zip>
    <phone>+4712345678</phone>
  </customer>
  <item sku="K-100" qty="2">Keyboard</item>
  <item sku="M-200" qty="1">Mouse</item>
  <total currency="USD">149.50</total>
  <inv:warehouse>Oslo</inv:warehouse>
Try XML to JSON

JSON to XML

Convert JSON to well-formed XML with a root element of your choice.
{
  "order": {
    "@_id": "A-1042",
    "customer": "Ada & Sons <ada@example.com>",
    "paid": true,
    "discount": null,
    "items": [
      { "sku": "X-100", "qty": 2, "price": 19.95 },
      { "sku": "X-200", "qty": 1, "price": 5 }
    ],
    "shipping address": {
      "city": "Oslo",
Try JSON to XML

JSON to TOML

Convert JSON to TOML for Cargo, pyproject and other config files.
{
  "title": "Example service",
  "debug": false,
  "owner": {
    "name": "Ada",
    "created": "2024-01-15T10:30:00Z"
  },
  "proxy": null,
  "ports": [8000, 8001],
  "build info": {
    "retries": 3,
    "ratio": 1.5
Try JSON to TOML

TOML to JSON

Convert TOML tables, arrays of tables and dates to JSON.
# Cargo.toml
[package]
name = "orders-cli"
version = "0.4.2"
edition = "2021"
authors = ["Ada Lovelace <ada@example.com>"]
description = "Command line client for the orders API"
license = "MIT OR Apache-2.0"

[package.metadata.release]
published = 2026-03-14T09:30:00Z
embargo = 2026-03-01
Try TOML to JSON

Spreadsheet and table converters

Turn JSON into rows and columns, or spreadsheet rows back into JSON.

JSON to CSV

Convert a JSON array to CSV, with nested objects flattened into columns.
{
  "meta": { "total": 3, "page": 1 },
  "data": {
    "users": [
      {
        "id": 1,
        "name": "Ada Lovelace",
        "email": "ada@example.com",
        "address": { "city": "London", "country": "UK" },
        "roles": ["admin", "editor"],
        "bio": "Wrote the first \"program\", in 1843."
      },
Try JSON to CSV

CSV to JSON

Convert CSV with a header row to a JSON array of objects, with numbers and booleans typed.
id,name,price,in_stock,zip,order_id,address.city,notes
1,Desk lamp,24.90,true,02134,9007199254740993,Boston,"Warm light, dimmable"
2,Standing desk,399,false,10001,9007199254740994,New York,"Described as ""quiet"" by the maker"
3,Cable tray,4.50,true,94103,9007199254740995,San Francisco,
Try CSV to JSON

JSON to Excel

Convert JSON to an Excel .xlsx spreadsheet you can open in Excel, Numbers or Google Sheets.
[
  {
    "orderId": "00012345678901234567",
    "customer": {
      "name": "Zoë Müller",
      "email": "zoe@example.com",
      "address": { "city": "Oslo", "country": "NO" }
    },
    "total": 129.5,
    "paid": true,
    "tags": ["gift", "express"],
    "notes": "Leave at the door, \"ring twice\"",
Try JSON to Excel

Excel to JSON

Convert an Excel .xlsx, .xls or .ods sheet, or pasted cells, to JSON.
id	name	plan	monthly_price	active	zip	joined	notes
1	Ada Lovelace	pro	29.5	TRUE	02134	2024-01-15	
2	Linus Torvalds	free	0	FALSE	90210	2024-02-03	"Likes ""fast"" builds, mostly"
3	Grace Hopper	pro	29.5	TRUE	10001	2024-03-21	
Try Excel to JSON

JSON to HTML table

Convert a JSON array to an HTML table you can paste into a page or email.
[
  {
    "id": 1,
    "name": "Ada Lovelace",
    "role": "Engineer",
    "active": true,
    "address": { "city": "London", "country": "UK" },
    "skills": ["math", "analysis"]
  },
  {
    "id": 2,
    "name": "Tom & Jerry <Studios>",
Try JSON to HTML table

JSON to code

Generate typed classes, interfaces, structs and SQL from a sample JSON document.

JSON to TypeScript

Generate TypeScript interfaces or types from a JSON sample.
{
  "id": 1042,
  "name": "Ada Lovelace",
  "email": "ada@example.com",
  "active": true,
  "createdAt": "2024-03-15T09:30:00Z",
  "manager": null,
  "address": {
    "street": "12 Analytical Way",
    "city": "London",
    "geo": { "lat": 51.5074, "lng": -0.1278 }
  },
Try JSON to TypeScript

JSON to C#

Generate C# classes with properties for System.Text.Json or Newtonsoft.Json from JSON.
{
  "order_id": 100234,
  "customer": {
    "first_name": "Ada",
    "last_name": "Lovelace",
    "email": "ada@example.com",
    "phone": null
  },
  "total": 59.9,
  "paid": true,
  "created_at": "2025-03-14T09:30:00Z",
  "tags": ["priority", "gift"],
Try JSON to C#

JSON to Go

Generate Go structs with json tags from a JSON sample.
{
  "user_id": 48213,
  "username": "ada.lovelace",
  "email": "ada@example.com",
  "is_active": true,
  "balance": 1042.75,
  "created_at": "2024-03-18T09:30:00Z",
  "nickname": null,
  "roles": ["admin", "editor"],
  "address": {
    "street": "12 Analytical Way",
    "city": "London",
Try JSON to Go

JSON to Java

Generate Java POJO classes with getters and setters from JSON.
{
  "order_id": 1048576,
  "status": "shipped",
  "total": 129.95,
  "paid": true,
  "created_at": "2025-03-14T09:26:53Z",
  "ship_date": "2025-03-16",
  "coupon": null,
  "customer": {
    "id": 42,
    "full_name": "Ada Lovelace",
    "email": "ada@example.com"
Try JSON to Java

JSON to SQL

Generate a CREATE TABLE statement and INSERT rows from a JSON array.
[
  {
    "id": 1,
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "age": 36,
    "balance": 1250.75,
    "active": true,
    "signed_up": "2024-03-15",
    "last_login": "2025-01-20T08:30:00Z",
    "tags": ["admin", "math"],
    "address": { "city": "London", "zip": "N1 9GU" },
Try JSON to SQL

How to use these examples

  1. Click Use template or Try to open the example in its tool.
  2. Edit it to match your own data. For generator templates, the template tag reference lists every kind of fake data you can add, and repeat() sets how many records you get (up to 300 per array).
  3. Copy the result, or download it as a file.

Why generate dummy JSON instead of writing it?

Hand-written sample data tends to be small and repetitive ("Test User 1", "Test User 2"), so it misses the bugs that real data finds: long names, unusual characters, missing optional values and large lists. Generated data gives you realistic variety in seconds, contains no real people's information, and is easy to regenerate when your data model changes. Once your sample data looks right, convert it to the format you need with the JSON converters, or turn it into a contract with the JSON Schema Generator.