JavaScript Formatter
Re-indent JavaScript, with strings and regular expressions left alone.
Describe a shape and get as many rows of matching JSON as you need.
Anything not in this list is copied through as a literal, which is how you pin a constant.
The Mock JSON Generator takes a template describing the shape you want and returns as many rows of matching JSON as you ask for — nesting objects, repeating arrays and copying literals through unchanged.
Write a template describing the shape you want, using a field type as each value, and get back as many rows of real JSON as you ask for. It is the fastest way to produce a believable API response before the API exists.
The template is itself JSON, so nesting works the way you would expect: an object inside an object produces nested data, and an array containing one template produces a list of that shape. Field types cover names, contact details, addresses, dates, numbers, booleans, identifiers and lorem text. Anything that is not a recognised type is treated as a literal, so fixed values and enums are just written in place.
So nesting works the way you would expect, with no separate schema language to learn.
One template object inside an array produces a list of that shape, with a length in the range you set.
Anything not recognised as a field type is copied unchanged, which is how you pin a version or an enum value.
Names, emails, addresses, dates, numbers, prices, booleans, identifiers and lorem text.
The output is valid JSON, so it drops straight into a fixture file or a mock server.
A JSON object where each value names a field type, such as "fullName" or "price".
Objects nest; an array with one item inside becomes a list of that shape.
How many top-level rows to produce.
Formatted and ready for a fixture, a mock server or a prototype.
Just nest them in the template. An object value produces an object with the same shape, to any depth.
Put one template object inside an array. Each row then gets an array of that shape, with a random length within the bounds you set.
Write it literally. Anything the generator does not recognise as a field type is copied through unchanged, which is how you set a constant or a version number.
It produces the body; a mock server also handles routes, status codes and latency. Generate the body here and paste it into whatever is serving it.
What people who use the Mock JSON Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the Mock JSON Generator. It takes half a minute and no account.
Write the first reviewRe-indent JavaScript, with strings and regular expressions left alone.
Generate an RSA key pair in PEM form, in your browser.
Generate plausible addresses in the format each country actually uses.
Turn an array of JSON records into INSERT statements, with an optional CREATE TABLE.
Compare two semantic versions and test them against a range.
Break an emoji into its code points, modifiers and joiners.
Network, broadcast and host range from any CIDR block.
Generate Dart model classes with fromJson and toJson from a sample payload.