Templates
Types
EN

AI Diagram from JSON

Paste JSON — an API response, a schema, a document sample. Get an ERD or class diagram back.

Try one of these — click to open in the generator

When to use AI Diagram from JSON

Deep dive

JSON is easy to read one level deep and painful to read once it's five levels of nested arrays and objects — which is exactly when a diagram helps. This page is for pasting raw JSON (an API response, a JSON Schema, a document-database sample, an OpenAPI component definition) and getting back a visual: an ERD when the shape is relational (entities with implied foreign keys), or a class diagram when the shape is closer to a typed object model (DTOs, request/response shapes with inheritance).

The AI infers relationships from JSON structure the way an experienced backend engineer would read it: a nested object becomes an owned/embedded entity or a foreign-key relationship depending on context, an array of objects becomes a one-to-many relationship, and a field that looks like an ID reference (`userId`, `authorId`, a Mongo `ObjectId`) becomes a foreign key even without an explicit `$ref`. For JSON Schema input with real `$ref` pointers, those are honored directly.

This is a reading, not a formal schema validator — for deeply ambiguous JSON (is this nested object embedded data or a normalized reference? both are valid database designs) the AI makes a reasonable call, and you should sanity-check the cardinality it inferred before using the diagram in a real schema design doc. It shines at turning "here's a confusing 200-line JSON blob" into "here's the shape of the data" in one step.

Ready to try it yourself?

Frequently asked questions

Prefer a conversation?

Not sure how to phrase your prompt? Chat mode lets AI ask 2-3 clarifying questions about actors, events, and edge cases — then draws.

Try Chat to Diagram

Want to draw better diagrams?

Read our in-depth tutorials — symbols, structures, 9 rules, and copy-paste prompt templates for real-world flows.

Read the tutorials

Related tools