Type-safe diagrams and source code from one schema.

Define your domain once. Generate types for TypeScript, Python, Rust, Go, C#, F#, Dart, PHP, and Protobuf — and a direct-manipulation visual type canvas — from the same source.

Schema.td
Live Preview: Syncing

One .td file in. Three outputs out.

typeDiagram is a tiny, language-neutral DSL for describing your data model — records, tagged unions, generics, aliases.

code

Source code, 9 languages

TypeScript, Python, Rust, Go, C#, F#, Dart, PHP, and Protobuf — DTOs, data classes, discriminated unions, pattern-matchable enums — generated from the same definition, always in sync.

schema

Visual type editor

Drag types, edit fields in place, draw relationships, pan, zoom, and auto-layout. Every change remains a clean, versionable .td schema.

swap_horiz

Round-trip conversion

Convert existing TypeScript, Python, Rust, Go, C#, F#, Dart, PHP, or Protobuf types back to the DSL. Retrofit an existing codebase without rewriting it.

hub

A canvas backed by a real schema

The beautiful canvas and the source model are one document. Visual edits produce typed source, ready to generate code in every supported language.

sync

One definition, N outputs

Python backend, Dart/Kotlin mobile app, TypeScript web client, Rust data pipeline, gRPC services — keeping DTOs aligned across nine languages is a full-time job. Change a field, regenerate, done.

VS Code Extension

A visual type canvas in your editor.

Drag nodes, edit fields, draw relationships, and navigate the infinite canvas beside syntax-highlighted source. Every edit stays synchronized. Available free on the Visual Studio Marketplace.

typeDiagram VS Code extension showing live SVG preview of a chat-model schema alongside .td source code
Install the .vsix manually
  1. Download typediagram.vsix above.
  2. Open VS Code and press Ctrl+Shift+P (Cmd+Shift+P on macOS).
  3. Run Extensions: Install from VSIX… and select the downloaded file.
  4. Or from the terminal: code --install-extension typediagram.vsix
Engineered for Scale

Complex type systems, shaped visually.

Sketch relationships as freely as a whiteboard while typeDiagram keeps the architecture versionable, generated, and strictly typed.