JSON Template Creator
How to use the JSON Template Creator
Pick a template such as a user profile, product, address or API response, or paste one JSON object of your own. Edit the keys and example values until they match your app. To get a test dataset, enter how many records you need (up to 100) and click Generate records: the tool keeps your structure and fills each record with different but realistic values. Then copy the result or download it as a .json file. Everything runs in your browser.
What the templates are for
- User profile: id, username, email, roles and timestamps for account data.
- Product: price, stock, tags and nested dimensions for catalog data.
- Address: street, city, postal code and coordinates.
- API response: a common wrapper with status, data and pagination.
- To-do list, App settings, Blog post: small examples of arrays, nested objects and booleans.
Example workflow
Suppose you are building an orders screen and need ten sample customers. Choose User profile, rename fullName to name if that is what your app expects, add a field such as "city": "Pune", set Records to 10 and click Generate records. You get an array of ten users with ids 1 to 10, different names, matching emails such as priya.silva2@example.com, a mix of active and inactive accounts, creation dates one day apart and real city names. Click Download .json and load the file in your app or test.
Frequently asked questions
Are these official standards?
No. They are illustrative examples. Field names and structure should be adapted to your own system or API specification.
Is anything sent to a server?
No. Templates are generated and edited in your browser.
Can I add my own keys?
Yes. The editor accepts any text; use Validate to confirm the result is correct JSON.
How are the generated records different from each other?
The tool reads each field name and value type. id counts up, dates move forward one day per record, emails and usernames get matching fictional names, prices and quantities change within a sensible range, and city, state, country, postal code and coordinates are kept consistent with each other. Fields it does not recognise, such as currency or theme, keep the value you typed. The output is the same every time for the same input, so tests stay repeatable.
Designing a good JSON structure
A template is only a starting point. When you adapt it for a real app or API, a few decisions made early save a lot of rework later, because changing a structure after other code depends on it is painful. These are the conventions experienced API designers tend to follow.
- Pick one naming style and keep it. The templates use camelCase (
createdAt,isActive). If your backend uses snake_case (created_at), convert every key; mixing both in one response confuses everyone who uses it. - Write dates as ISO 8601 strings, such as
"2026-11-01T09:30:00Z". They sort correctly as text, include the time zone, and every language can parse them. - Be careful with money. Floating-point numbers can produce rounding errors such as 0.1 + 0.2 = 0.30000000000000004. Many payment APIs store amounts as whole numbers in the smallest unit (for example 1999 for 19.99) together with a
currencycode. - Name booleans as questions:
isActive,hasShipped,inStock. The meaning oftrueis then obvious. - Use arrays for lists, even with one item. If a user can have several roles, always send
"roles": ["user"], never a plain string, so client code does not need two cases. - Decide between
nulland a missing key. A common rule is: include the key withnullwhen the value is known to be empty, and leave the key out when the field does not apply. - Keep nesting shallow. Two or three levels are easy to read; six levels usually means some objects should be separate resources referenced by ID.
The API response wrapper
The “API response” template wraps the actual records in data and adds status, message and pagination. This envelope pattern lets a client always find results in the same place and check paging without guessing. Whether to use an envelope is a design choice: some APIs return a bare array and put paging details in HTTP headers instead. Either works if it is consistent across every endpoint.
Need data served over HTTP instead of a file? The Fake API & Mock Data Generator returns up to 100 items per topic from a real endpoint, and the Demo API supports GET, POST, PUT and DELETE without a key. Use this tool when you need records that match your own field names.
Limitations
Sample values such as emails and addresses are fictional. Do not treat them as real data. See our Disclaimer and Privacy Policy. Browse the full tools directory. Related tool: JSON Formatter & Validator.
Learn more: read our Developer Guides, articles on JSON, REST APIs and URL encoding.