FillText.com

Introduction

FillText generates JSON datasets for testing or demonstration purposes.

Demos:

http://filltext.com/?rows=20&fname={firstName}&lname={lastName}
fname,lname,telephone,address,city,state,zip
id,email,username,password

React Example

AngularJS Example

jQuery Example

Vanilla JS Example

Tutorial

Plug-ins


Options

feature description example output
~ Concatenates two objects fullname={firstName}~{lastName} fullname:"John Smith"
key= description example output
rows required, limit 1000 rows=100 100 items
optional random flag rows=! 0-100 items
optional random limit rows=!10 0-10 items
value returns the value for key name=John name:"John"
{firstName} returns a random first name fname={firstName} "fname":"Joe"
{lastName} returns a random surname lname={lastName} "lname":"Smith"
{business} returns a random surname company={business} "company":"Smith Industries"
{streetAddress} returns a random street address address={streetAddress} "address":"101 Sample Ln"
{city} returns a random city city={city} "city":"Hill Valley"
{usState|abbr} returns a random US state name or optionally the 2-letter abbreviation state={usState|abbr} "state":"IL"
    state={usState} "state":"Illinois"
{addressObject} returns a full address object address={addressObject} "address": {
"streetAddress": "1432 Aenean Ct",
"city": "Dayton",
"state": "CO",
"zip": "94840"
}
{zip} returns a random 5-digit zip code zip={zip} "zip":"12345"
{country|abbr} returns a random country name or optionally the 2 or 3 letter abbreviation country={country} "country":"El Salvador"
    country={country|abbr2} "country":"SV"
    country={country|abbr3} "country":"SLV"
{email} returns a random email address email={email} "email":"something@somewhere.com"
{ip} returns a random IPv4 address ip={ip} "ip":"153.123.15.1"
{username} returns a random username uname={username} "uname":"JSmith"
{password} returns a random password pwd={password} "pwd":"P88yg"
{ccType|abbr} returns a credit card type or optionally the abbreviation for that type ccType={ccType|abbr} "ccType":"AMEX"
    ccType={ccType} "ccType":"American Express"
    Available types AMEX, DISC, MC, VISA
{ccNumber|type} returns a valid credit card number for the optional type cc={ccNumber|DISC} "cc":"6011467129650052"
    cc={ccNumber} "cc":"4221275995626366"
{phone|format} returns a 10-digit telephone number, optionally formatted as (XXX)XXX-XXXX phone={phone} "phone":"1234567890"
    phone={phone|format} "phone":"(123)456-7890"
{index} returns the index of the current record id={index} "id":1
{date|min,max} returns a random date between the min and the max dates, the default is 1-1-1900 to 1-1-2100 x={date} "x":"1930-10-18T04:28:27.432Z"
    x={date|10-10-2010} "x":"2012-10-18T04:28:27.432Z"
    x={date|10-10-2010,10-12-2010} "x":"2010-10-11T04:28:27.432Z"
{lorem|n} returns a random lorem ipsum of n length, the default is 5 words={lorem} "words":"lorem ipsum dolor xoxoxo oooo"
    words={lorem|2} "words":"lorem ipsum"
pretty beautifies the JSON data pretty=true
callback wraps the JSON data in a callback function callback=cb cb(JSON DATA)
[x,y,z] sets value to random element from the array passed in category=[1,2,3,4] "category":2
    category=["x","y","z"] "category":"y"
{bool|n} returns a random true or false or the optional boolean passed as n active={bool} "active":true
    active={bool|false} "active":false
{string|n}
legacy function: {randomString|n}
returns a random string of n length, the default is 5 password={string} "password":"x1KQ5"
    password={string|8} "password":"p4TtyJ1c"
{number|max}
legacy function: {randomNumber|max}
returns a random integer up to the optional max, the default max is 10 id={number}} "id":8
    id={number|100}} "id":55
{numberLength|length}
legacy function: {randomNumberLength|length}
returns a random string of digits of up to the optional length, the default length is 5 id={numberLength} "id":12345
    id={numberLength|3}} "id":123
{numberRange|min, max}
legacy function: {randomNumberRange|MINtoMAX}
returns a random integer between MIN and MAX, the deault is 0to1 id={randomNumberRange} "id":1
    id={randomNumberRange|5to50} "id":26
{randomDecimal|max} returns a random decimal up to 0.00000000000001 minus the optional max, the default max is 1 x={randomDecimal}} "x":0.14641021215356886
    x={randomDecimal|4}} "x":3.741405854932964
{randomDecimalRange|MINtoMAX} returns a random decimal between MIN and MAX, the deault is 0to1 x={randomDecimalRange} "x":0.14641021215356886
    x={randomDecimalRange|0.25to0.26} "x":0.25155138769885527
{stringArray|length,stringLength} returns a string array of the optional length containing randoms strings of the optional stringLength. The default is 5,5 x={stringArray} "x":["SGvuA","ditZd","S8rBF","YHgPd","jKYB0"]
    x={stringArray|2} "x":["SGvuA","ditZd"]
    x={stringArray|2,2} "x":["Sx","dI"]
delay delays the response up to a maximum of 30 seconds delay=10 Response is delayed by 10 seconds
err Will return an error of the specified type and override all other inputs, can be used without "rows" err=300 returns "Multiple Choices"
    err=301 returns "Moved Permanently"
    err=302 returns "Found"
    err=303 returns "See Other"
    err=304 returns "Not Modified"
    err=305 returns "Use Proxy"
    err=306 returns "Switch Proxy"
    err=307 returns "Temporary Redirect"
    err=308 returns "Permanent Redirect"
    err=400 returns "Bad Request"
    err=401 returns "Unauthorized"
    err=402 returns "Payment Required"
    err=403 returns "Forbidden"
    err=404 returns "Not Found"
    err=405 returns "Method Not Allowed"
    err=406 returns "Not Acceptable"
    err=407 returns "Proxy Authentication Required"
    err=408 returns "Request Timeout"
    err=409 returns "Conflict"
    err=410 returns "Gone"
    err=411 returns "Length Required"
    err=412 returns "Precondition Failed"
    err=413 returns "Request Entity Too Large"
    err=414 returns "Request-URI Too Long"
    err=415 returns "Unsupported Media Type"
    err=416 returns "Requested Range Not Satisfiable"
    err=417 returns "Expectation Failed"
    err=418 returns "I'm a teapot"
    err=422 returns "Unprocessable Entity"
    err=423 returns "Locked"
    err=424 returns "Failed Dependency"
    err=425 returns "Unordered Collection"
    err=426 returns "Upgrade Required"
    err=449 returns "Retry With"
    err=450 returns "Blocked by Windows Parental Controls"
    err=451 returns "Legally Restricted"
    err=500 returns "Internal Server Error"
    err=501 returns "Not Implemented"
    err=502 returns "Bad Gateway"
    err=503 returns "Service Unavailable"
    err=504 returns "Gateway Timeout"
    err=505 returns "HTTP Version Not Supported"
    err=506 returns "Variant Also Negotiates"
    err=507 returns "Insufficient Storage"
    err=509 returns "Bandwidth Limit Exceeded"
    err=510 returns "Not Extended"
{this.*|n} Returns an already generated value lname={lastName}&biz={this.lname}~Inc. {
"lname": "Smith",
"biz": "Smith Inc."
}
Optional limit value lname={lastName}&biz={this.lname|2}~Inc. {
"lname": "Smith",
"biz": "Sm Inc."
}

Low Level Functions You'll Probably Never Use

feature description example output
{letter|n} returns a random string of any case letters of n length, the default is 5 password={letter} "password":"AbCdE"
{letterLower|n} returns a random string of lowercase letters of n length, the default is 5 password={letter} "password":"abcde"
{letterUpper|n} returns a random string of uppercase letters of n length, the default is 5 password={letter} "password":"ABCDE"
char returns a random Unicode character between 0 and 100 ?rows=3&c={char} [{"arr":"\u0006"},{"arr":"'"},{"arr":"/"}]

Advanced (and sometimes experi/\/\ental)

feature description example output
@key generates a nested JSON dataset rows=1&name={firstName}&@friends={rows=5} [{"name":"Sheldon","friends":[{},{},{},{}]}]
subset configuration requires * (asterisk) as a parameter delimiter rows=1&name={firstName}&@friends={rows=5*name={firstName}} [{"name":"Kendall","friends":[{"name":"David"},{"name":"Joann"},{"name":"Jerrod"},{"name":"Theresia"},{"name":"Leela"}]}]
Cannot currently render more than one level of nested data.
WILL NOT WORK: ?rows=1&fname={firstName}&@friends={rows=1*friendName={firstName}*@nestedFriends={rows=5}}
?gist generates JSON from a gist ?gist=2260cda3c59f6df8edef awesomesauce.
gst