Mock Data API

The Mock Data API allows developers to generate realistic random data from a JSON Schema. Each request returns a share link that can be used directly in your frontend applications to fetch consistent mock data for prototyping or testing.

POST

https://jsontoall-tools.vercel.app/mock-api/generate

Generates random data from a JSON schema and returns a share link with a preview of the generated records.

Parameters

FieldTypeRequiredDescription
jsonSchemaobjectYesThe schema definition. Keys are field names, values are generators like "uuid", "firstName", "email", etc.
recordsintegerNo (default = 1)Number of records to generate.

Request Example


curl -X POST hthttps://jsontoall-tools.vercel.app/mock-api/generate
  -H "Content-Type: application/json" \
  -d '{
  "jsonSchema": {
    "id": "uuid",
    "firstName": "firstName",
    "lastName": "lastName",
    "email": "email",
    "username": "username",
    "password": "password",
    "phone": "phone",
    "company": "company",
    "jobTitle": "jobTitle",
    "price": "price",
    "coordinates": "coordinates",
    "createdAt": "date"
  },
  "records": 2
}'

200 Successful


{
  "apiUrl": "/mock-api/share/3d08bb76-0041-44dd-95bb-a19e9c173b29",
  "preview": [
    {
      "id": "24059a6d-4370-4ea3-95fa-c89c1c4a289b",
      "firstName": "Cody",
      "lastName": "Abernathy",
      "email": "Sterling_Crona-Will@yahoo.com",
      "username": "Gail_Dooley",
      "password": "Apv1gpK_FMwZtsd",
      "phone": "(335) 730-3808 x778",
      "company": "Koepp, Hagenes and Stroman",
      "jobTitle": "Forward Configuration Developer",
      "price": "583.77",
      "coordinates": { "lat": -57.6762, "lng": 153.3869 },
      "createdAt": "2025-12-21T20:06:46.652Z"
    }
  ]
}
GET

https://jsontoall-tools.vercel.app/mock-api/share/:shareId

Retrieves the previously generated mock data using the share ID. This endpoint is ideal for embedding directly in your frontend application.

Parameters

FieldTypeRequiredDescription
shareIdstringYesThe ID returned in apiUrl from /mock-api/generate.

Request Example


curl -X GET https://jsontoall-tools.vercel.app/mock-api/share/d6e6e81c-59f4-4b4f-a464-68e253a85328"

200 Successful


{
  "status": "success",
  "data": [ ...same as preview above... ]
}

Error Responses


400 Bad Request
{
  "status": "error",
  "message": "Invalid schema format"
}

Supported Schema Properties

Use the following property keys in jsonSchema. Each key maps to a generator powered by faker.js.

Schema PropertyTypeExample ValueNotes
Identity / User
firstNamestringSouravGenerates a random first name, useful for mocking data.
lastNamestringHalderGenerates a random last name, useful for mocking data.
middleNamestringJamesGenerates a random middle name. This is useful for creating realistic mock data
fullNamestringJohn James DoeUseful when both first + last are needed together
genderstringMaleReturns "male" or "female" randomly
jobTitlestringSoftware EngineerGenerates a random professional title
jobTypestringFull-timeRandom job type (e.g., Full-time, Contract, Part-time)
biostringPassionate developer with 5+ years in frontendGenerates a short random biography text
Address / Location
streetstring42 StreetGenerates a street address
secondaryAddressstringApt. 12BDXAdds extra info (apartment, suite, etc.)
buildingNumberstring221BBuilding / house number
citystringKolkataRandom city name
statestringWest BengalFull state/region name
stateAbbrstringWBAbbreviated state code
countrystringIndiaRandom country
countryCodestringINISO 2-letter country code
zipstring700*****Postal / ZIP code
directionstringNorth-EastRandom compass direction
timezonestringAsia/****Valid IANA timezone string
coordinatesobject{ "lat": -57.6762, "lng": 153.3869 }Returns numeric lat/lng
Commerce / Business
productstringShoesGenerates a simple product type
productNamestringErgonomic Wooden ChairGenerates a full product name
productDescriptionstring"Stylish chair with comfort"Generates a marketing-like description
departmentstringElectronicsRandom commerce department
pricestring199.99Random price as string
priceRangestring349.50Price with custom range
currencystringUSDISO 4217 currency code
creditCardNumberstring4111-1111-1111-1111Generates a fake credit card number
ibanstringDE89370400440532013000Generates an International Bank Account Number
bicstringDEUTDEFFBank Identifier Code (SWIFT)
transactionDescriptionstringPayment for invoice #12345Random financial transaction description
Tech / Internet
emailstringjohn.doe@example.comGenerates a random but valid-looking email address
usernamestringjohndoe92Generates a random username
passwordstringpassW0rd!Generates a random password with mixed characters
urlstringhttps://example.comGenerates a random URL
domainstringexample.orgGenerates a domain name
ipstring192.168.1.10Generates a random IPv4 address
ipv6string2001:0db8:85a3:0000:0000:8a2e:0370:7334Generates a random IPv6 address
macstring00:1B:44:11:3A:B7Generates a random MAC address
emojistring🚀Generates a random emoji character
Date & Time
datestring (ISO)2025-08-20T14:32:00.000ZGenerates a random date-time anytime
pastDatestring (ISO)2021-05-14T09:22:00.000ZGenerates a random date in the past
futureDatestring (ISO)2026-03-02T18:45:00.000ZGenerates a random date in the future
recentDatestring (ISO)2025-08-18T07:12:00.000ZGenerates a date from the recent past
birthdatestring (ISO)1993-04-25T00:00:00.000ZGenerates a plausible birthdate
soonDatestring (ISO)2025-08-25T11:15:00.000ZGenerates a date in the near future
monthstringAugustGenerates a random month name
weekdaystringWednesdayGenerates a random day of the week
Text / Content
wordstringinnovationGenerates a single random word
wordsstringcreative smart designGenerates multiple random words
sentencestringThe quick brown fox jumps.Generates a single sentence
sentencesstringThe sun is shining. Birds are singing.Generates multiple sentences
paragraphstringLorem ipsum dolor sit amet...Generates a single paragraph
paragraphsstringLorem ipsum dolor sit amet... Sed ut perspiciatis unde omnis...Generates multiple paragraphs
slugstringcreative-design-ideasGenerates a URL-friendly slug
System / Misc
uuidstring"7c9e6679-7425-40de-944b-e07fc1f90ae7"Universally unique identifier (UUID v4)
nanoidstring"V1StGXR8_Z5jdHi6B-myT"Random NanoID string (secure, URL-friendly)
fileNamestring"document_report.pdf"Random file name with extension
fileTypestring"image"File type (like image, video, application)
mimeTypestring"application/json"MIME type of a file
semverstring"1.4.2"Semantic version string
colorstring"orchid"Human-readable color name
rgbstring"rgb(255, 99, 71)"RGB color string
hexstring"#ff6347"Hexadecimal color code
Communication / Company
phonestring"+1-202-555-0198"Generates a random phone number
phoneIMEIstring"356938035643809"Generates a random phone IMEI number
companystring"Globex Corporation"Generates a company name
catchPhrasestring"Empowering next-gen solutions"Generates a company catch phrase
buzzwordstring"synergy"Generates a company buzzword
Media
imageUrlstring (URL)"https://loremflickr.com/640/480"Generates a random image URL
avatarstring (URL)"https://avatars.githubusercontent.com/u/9919?v=4"Generates a random avatar image URL
abstractImagestring (URL)"https://loremflickr.com/640/480/abstract"Generates a random abstract category image URL
Numbers & Boolean
numberinteger42Generates a random integer between 1 and 100
floatfloat57.34Generates a random floating-point number between 1 and 100 with 2 decimal places
booleanbooleantrueGenerates a random true or false value