Sample JSON API responses, in every common shape
Pick a resource, a shape and a size. You get the JSON a real API would send: pages, cursors, JSON:API, HAL, GraphQL or an error, made on your device.
- 10 resources
- 7 shapes and 6 errors
- Up to 1 MB
- Same JSON every time
Example JSON responses the way real APIs send them, for mocks, tests and documentation. Pick a resource (users, posts, comments, products, orders, todos, invoices, files, notifications or events), a shape and a size from 1 KB to 1 MB. The same records come as one object, a plain list, a page with links, a cursor page, JSON:API, HAL or a GraphQL connection, and there are error responses too: 404, 401, 422 validation errors, 429, 500 and a GraphQL error. Each one is made in your browser, and the same choice always gives the same JSON. For bigger files, use the Large JSON File Generator.
What people use these files for
- Mock an API
Serve the file from json-server, MSW, WireMock or Prism while the real backend is being built.
- Write tests
Give your client code a page, a cursor, an empty-ish response or a 429, and check that it handles each.
- Document an API
Show readers what a JSON:API, HAL or GraphQL response looks like, with realistic fields.
- Learn the shapes
Compare the same users as a plain list, a page with links and a GraphQL connection, side by side.
Need more than 1 MB? The Large JSON File Generator makes files up to 1 GB.
How to get a sample API response
- Pick a resource, such as users or orders.
- Pick a shape: one object, a plain list, page numbers, a cursor, JSON:API, HAL, GraphQL, or an error.
- Pick a size, then copy the response, download it, or open it in GigaJSON. The address keeps your choice, so you can share a link to it.
Private, and made for big files
This tool runs in your browser, in a background worker: nothing you paste or open is uploaded, and nothing is kept after you leave. JSON and XML input can be up to 1 GB, depending on available memory. Processing runs in a background worker; large analyses can take a minute or more. Already loaded features keep working if your connection drops. Loading another tool or jq for the first time needs a connection. When one tool isn't enough, GigaJSON opens your data with a tree, a table, JSONPath/JMESPath/jq queries, transforms, diff and history.
Sample API response questions
What do the shapes mean?
One object is what GET /users/1 returns. A plain list is a bare JSON array. Page numbers wrap the list as { data, meta, links } with page counts and next/prev links. Cursor is { data, has_more, next_cursor }, close to Stripe's list objects. JSON:API puts each record's fields under attributes with a type and a string id. HAL adds _links and puts the list under _embedded. GraphQL returns a Relay connection: edges with a node and a cursor, plus pageInfo.
Which error format do the errors use?
Problem details (RFC 9457, which replaced RFC 7807): type, title, status, detail and instance, with an errors list for validation and retry_after for rate limits. The GraphQL error follows the GraphQL spec: HTTP 200 with an errors list next to data.
Can I use these in a mock server or tests?
Yes. Download the file and serve it from your mock (json-server, MSW, WireMock, Prism), or paste it into a test fixture. The data is made up: names, emails and URLs use example.com.
Why is a response sometimes bigger than the size I chose?
A response always holds at least one record. A blog post with its comments is already over 1 KB, so at 1 KB you get one post and the page says so.
Is the response the same every time?
Yes. Each record is made from its number, so the same resource, shape and size always give the same JSON.
Is my data uploaded?
No. The tool runs in your browser, in a background worker. Nothing you paste or open goes to a server, and nothing is kept after you leave the page.
All tools
- JSON FormatterIndent with 2 or 4 spaces, sort keys
- JSON ValidatorLine and column of the first error
- JSON MinifierRemove whitespace, see the bytes saved
- JSON RepairFixes quotes, commas, comments, AI output
- JSON Schema GeneratorA JSON Schema from examples
- JSON Schema ValidatorCheck JSON against a schema
- JSON Token CounterCount tokens, select data, compare JSON and TOON
- JSON EditorTree and code editing, undo and history
- Large JSON ViewerTree, table and search for huge files
- JSON Lines ViewerJSONL and NDJSON logs as a table
- JSON Log ViewerCount and filter JSON Lines logs
- Large CSV ViewerCSV files too big for Excel, up to 1 GB
- JSON VisualizerThe data as a graph, PNG and SVG export
- JSON DiffChanges between two documents
- JSON Path FinderClick a value, copy its path
- JSONPath TesterJSONPath, JMESPath and jq, live
- JMESPath PlaygroundJMESPath, for AWS CLI queries too
- jq PlaygroundReal jq in your browser
- JSON to CSVNested objects become dotted columns
- JSON to ExcelAn .xlsx sheet, numbers kept as numbers
- CSV to JSONDelimiters detected, 007 stays 007
- JSON to XML@keys become attributes
- XML to JSONRSS feeds, sitemaps, SOAP responses
- JSON to YAMLReadable YAML, ambiguous strings quoted
- YAML to JSONAnchors and multiple documents
- JSON Lines to JSONNDJSON or JSONL into one array
- JSON to JSON LinesA JSON array as one record per line
- JSON to TOONConvert JSON to TOON, with token counts
- JSON to MermaidA flowchart or class diagram, drawn
- JSON SplitterCut a big file into parts, or sample it
- JSON to TypeScriptInterfaces inferred from your data
- JSON to GoGo structs with json tags
- JSON to RustRust structs that derive serde's Serialize and Deserialize
- JSON to PythonPython dataclasses with type hints
- JSON to JavaJava classes with getters and setters
- JSON to C#C# classes with System.Text.Json attributes
- JSON to KotlinKotlin data classes
- JSON to SwiftSwift structs that conform to Codable, with CodingKeys
- JSON to DartDart classes with fromJson and toJson
- JSON to ZodZod schemas with TypeScript types inferred from them
- JWT DecoderHeader, payload and expiry, locally
- JSON EscapeText to a JSON string and back
- Sample JSON FilesDownload test JSON, 100 KB to 1 GB
- Sample JSON Lines FilesDownload test NDJSON, one record per line
- Sample CSV FilesDownload test CSV, 100 KB to 1 GB
- Sample XML FilesDownload test XML, 100 KB to 1 GB
- Sample GeoJSON FilesPoints, lines and polygons, up to 1 GB
- Sample Nested JSONRecords 8 levels deep, up to 1 GB
- Sample Unicode JSON13 scripts, emoji and escapes
- Sample API ResponsesJSON:API, HAL, GraphQL, pages, errors
- Large JSON File GeneratorTest data from 100 KB to 1 GB