MrJSON Logo

Mr. JSON - Mock Data Generation API (R.I.P FillText.com)

Welcome to Mr. JSON, a free mock JSON data generation API for developers and testing purposes. Define the output schema you need with a simple and flexible syntax. Here are some examples:

Schema Demo Link
id, firstname, score https://mrjson.com/api?id={string|10}&name={firstName}&score={number}
email, fullname, dob https://mrjson.com/api?email={email}&fullName={fullName}&dob={date|01-01-1980,31-12-1999|MM/dd/yyyy}
index, address, phone https://mrjson.com/api?id={index|1}&address={addressObject}&tel={phone|area3}

Query Parameters

All parameters are case insensitive.

General Parameters

Parameter Description Default Example Demo
rows Number of records to generate (1-1000) 10 rows=10 Try it!
delay Number of seconds to delay response - delay=5 Try it!

Data Types

Numbers and Booleans

Type Description Example Output Demo
{index} Sequential number (0-based) id={index} 0 Try it!
{index|n} Sequential number starting from n id={index|1} 1 Try it!
{number} Random number (0 - 100) amount={number} 42 Try it!
{number|min,max} Random number in range amount={number|10,20} 13 Try it!
{boolean} Random Boolean isAdmin={boolean} true or false Try it!
{boolean|n} Boolean with probabilty n (0 - 1) of being true isAdmin={boolean|.7} true 70% of the time Try it!

Text Generation

Type Description Example Output Demo
{string|n} Random string of length n (default 5) str={string|10} "aB3$kP9#mN" Try it!
{lorem} Generate 3 random words text={lorem} "lorem ipsum dolor" Try it!
{lorem|n} Generate n random words text={lorem|5} "lorem ipsum dolor sit amet" Try it!
{lorem|min,max} Generate random number of words text={lorem|3,6} "lorem ipsum dolor sit" Try it!

Dates

Type Description Example Output Demo
{date} ISO formatted date dob={date} "2024-02-15T10:30:00.000Z" Try it!
{date|format} Custom formatted date dob={date|MM/dd/yyyy} "03/21/2024" Try it!
{date|min,max} Date within range dob={date|01-01-1980,31-12-1999} "1992-06-15T..." Try it!
{date|yyyy,yyyy} Date within year range dob={date|2020,2022} "2021-08-23T..." Try it!
{date|min,max|format} Formatted date in range dob={date|01-01-1980,31-12-1999|MM/dd/yyyy} "06/15/1992" Try it!
Date Range Format
Date Format Patterns
Pattern Description Example Output
yyyy Four-digit year "2024"
MM Two-digit month (01-12) "03"
M Single-digit month (1-12) "3"
Month Full month name "March"
Mon Month abbreviation "Mar"
dd Two-digit day (01-31) "09"
d Single-digit day (1-31) "9"
DOW Full day of week "Tuesday"
dow Day of week abbreviation "Tue"
HH Two-digit hour (00-23) "14"
H Single-digit hour (0-23) "14"
mm Two-digit minutes (00-59) "05"
m Single-digit minutes (0-59) "5"
ss Two-digit seconds (00-59) "09"
s Single-digit seconds (0-59) "9"

Common format examples:

Personal Information

Type Description Example Output Demo
{firstName} Random first name name={firstName} "John" Try it!
{middleName} Random middle name middle={middleName} "Robert" Try it!
{middleName|initial} Middle initial middle={middleName|initial} "R." Try it!
{lastName} Random last name lname={lastName} "Smith" Try it!
{title} Full title title={title} "Professor" Try it!
{title|abbr} Abbreviated title title={title|abbr} "Prof." Try it!
{fullName} Full name name={fullName} "John Smith" Try it!
{fullName|title} Full name with title name={fullName|title} "Mr. John Smith" Try it!
{fullName|middle} Name with middle name name={fullName|middle} "John Robert Smith" Try it!
{fullName|title,middle} Complete name name={fullName|title,middle} "Dr. John Robert Smith" Try it!
{fullName|title,middle,initial} With middle initial name={fullName|title,middle,initial} "Dr. John R. Smith" Try it!
{email} Random email address email={email} "john.doe@example.com" Try it!
{username} Random username username={username} "johnsmith123" Try it!
{password} Random password password={password} "aX9#mK2$p" Try it!

Phone Numbers

Type Description Example Output Demo
{phone} 10-digit phone number phone={phone} "5551234567" Try it!
{phone|area} 2 or 3 digit area code phone={phone|area} "(555)-123-4567" or (55)-123-45678 Try it!
{phone|area2} 2 digit area code phone={phone|area2} "(55)-123-45678" Try it!
{phone|area3} 3 digit area code phone={phone|area3} "(555)-123-4567" Try it!
{phone|country} 1 - 3 digit country code phone={phone|country} "+91-(555)-123-4567" Try it!
{phone|country, area2} country code & area code phone={phone|country, area2} "+91-(55)-123-4567" Try it!
{phone|country, area2, n} country & area codes. n digits total phone={phone|country, area2, 12} "+91-(55)-123-4567890" Try it!

Location

Type Description Example Output Demo
{streetAddress} Street address address={streetAddress} "123 Main St" Try it!
{city} City name city={city} "Chicago" Try it!
{zip} ZIP code zip={zip} "60601" Try it!
{usState} Full state name state={usState} "Illinois" Try it!
{usState|abbr} State abbreviation state={usState|abbr} "IL" Try it!
{country} Country name country={country} "United States" Try it!
{country|abbr2} 2-letter country code country={country|abbr2} "US" Try it!
{addressObject} Complete address object address={addressObject} {"streetAddress": "123 Main St", "city": "Chicago", "state": "IL", "zip": "60601"} Try it!

Business

Type Description Example Output Demo
{business} Company name company={business} "Acme Corporation" Try it!

Payment Information

Type Description Example Output Demo
{ccType} Credit card provider cardType={ccType} "Visa" Try it!
{ccType|abbr} Credit card provider abbreviation cardType={ccType|abbr} "VISA" Try it!
{ccNumber} Credit card number cardNumber={ccNumber} "4532123456789012" Try it!

Special Features

Description Example Demo
Use [square brackets] to randomly select from a list of options: dept=[HR,IT,Sales] Try it!
Use ~ to concatinate options: id={firstName}~{index} Try it!
Use this. to refer to previous values: name={firstName}&id={this.name}~{index} Try it!