FreeNo sign-upNothing uploadedPNG download

Class Diagram Generator

Describe your classes, fields, methods and relationships as text — get a UML class diagram instantly. Paste Mermaid classDiagram code — or start from the e-commerce example — and this free online class diagram generator renders it in your browser, ready to download as a crisp PNG. No sign-up, and nothing you paste leaves your device.

Rendering your class diagram…

The demo above is live — edit the code and hit Generate. The example that loads with the page is free; each Generate click uses one of your 10 free generations per day.

How it works

From classes written as text to a UML diagram in four steps.

1

List your classes

Each class with its fields and methods — plus how the classes relate: owns, places, inherits.

2

Turn it into Mermaid code

Write a block per class and connect them with arrows like Order "1" *-- "1..*" OrderItem — or let ChatGPT or Claude write the code for you.

3

Pick “Mermaid diagram” and hit Generate

The visual type is pre-selected on this page. Your class diagram is drawn instantly in your browser — nothing is uploaded.

4

Download PNG

One click, no watermark — ready for design docs, wikis or slides.

What goes into a class diagram

Three building blocks describe any object model — and all three are just text.

Class

Classes

Each box is a class — Customer, Order, Product — with its name on top and members listed inside.

Member

Fields & methods

One per line, with a visibility symbol: +String name for public fields, +placeOrder() for methods.

Relationship

Relationships & multiplicity

Arrows connect classes; quoted numbers like “1” and “0..*” say how many, and *-- marks composition.

From text to class diagram, the AI-friendly way

You never have to write Mermaid by hand: describe your domain to ChatGPT or Claude and paste what it returns here — no sign-up, and everything renders locally on your device.

Step 1

Describe your domain in English

Tell ChatGPT or Claude the classes you need — “an e-commerce model: customers place orders, orders contain line items that refer to products” — and ask for Mermaid classDiagram code.

Step 2

Paste the code here

Copy the class diagram code it returns and drop it into the box above, skipping the fence lines around the code block.

Step 3

Generate, download PNG

Hit Generate: the UML diagram draws instantly in your browser and exports as a crisp, watermark-free PNG for docs and slides.

Private by design: your class diagrams never leave your browser

Domain models often describe unreleased products. Text2Viz renders them locally, so nothing is uploaded.

Privacy

No sign-up, no account

There is nothing to create and nothing to log into. Open the page and start diagramming.

Privacy

Rendered locally

Your diagram is drawn by JavaScript running on your own device. Your model text is never sent to our servers.

Privacy

Safe for unreleased designs

Pre-launch product models, internal services, client projects — render them here without a second thought.

What people make with it

Three common ways people use this free class diagram generator.

Use case

Model a domain before building

Sketch the entities and relationships first — spot missing pieces and tangled ownership before you write a line of code.

Use case

Document an existing codebase

Turn your class structure into one diagram for onboarding docs, wikis and architecture reviews.

Use case

From AI chat to image

ChatGPT or Claude drafted your model as classDiagram code? Paste it here and export a shareable PNG.

Frequently asked questions

Is this class diagram generator free?
Yes. You get 10 free diagram renders per day, every day, with PNG download and no watermark. No account, no trial that expires.
How do I turn text into a class diagram online?
Write your diagram as Mermaid classDiagram syntax: start the first line with classDiagram, declare classes with a block listing their members, and connect them with lines like Customer "1" --> "0..*" Order : places. Hit Generate and the UML diagram draws instantly — no sign-up.
How do I write member visibility in Mermaid class diagrams?
Put a visibility symbol before each member inside the class block: + public, - private, # protected and ~ package. For example +String name is a public field and -int balance a private one. Methods work the same way, like +placeOrder().
How do I show inheritance, composition and aggregation?
Use --|> for inheritance (Dog --|> Animal), *-- for composition — a whole that owns its parts, like an order containing its items — and o-- for aggregation, where the whole merely references the parts. A plain --> arrow is a simple association.
Can AI write the classDiagram code for me?
Yes. Describe your classes, their fields and methods to ChatGPT or Claude and it will output Mermaid classDiagram code — paste the code block here (skip the fence lines) and render it into a diagram.
Can I download the class diagram as a PNG?
Yes. Every diagram has a Download PNG button — free, no watermark, exported at double resolution so class names, members and cardinality labels stay readable in docs and slides.

More text-to-diagram tools

The same paste-and-generate flow, tuned for other diagram types.

Diagram maker

Flowchart Maker

Process steps and decision branches from Mermaid flowchart syntax.

Diagram maker

ER Diagram Maker

Entity relationship diagrams for database schemas from Mermaid erDiagram syntax.

Diagram maker

State Diagram Generator

State machine diagrams for lifecycles from Mermaid stateDiagram-v2 syntax.

Diagram maker

User Journey Map Generator

Map customer journey steps, satisfaction scores and actors from Mermaid journey syntax.

Diagram maker

Pie Chart Generator

Turn labels and values into a pie chart with Mermaid pie syntax.

Diagram maker

Quadrant Chart Generator

Plot options on a 2x2 matrix with Mermaid quadrantChart syntax.

Diagram maker

Git Graph Generator

Visualize commits, branches and merges with Mermaid gitGraph syntax.

Diagram maker

Sankey Diagram Maker

Show how budget, energy or users flow between stages with Mermaid sankey-beta code.

Diagram maker

Block Diagram Maker

Lay out system components in a grid of blocks and arrows from Mermaid block-beta code.

Diagram maker

Requirement Diagram Maker

Map requirements, elements and satisfies links from Mermaid requirementDiagram code.

Diagram maker

C4 Context Diagram Maker

Draw a C4 context diagram — people, systems and relationships — from Mermaid C4Context code.

Diagram maker

C4 Container Diagram Maker

Zoom inside a system's containers with Mermaid C4Container syntax.

Chart maker

XY Chart Maker

Line and bar charts with axes and a title from Mermaid xychart-beta code.

Timeline

Text to Timeline Maker

Dates and events become a clean horizontal timeline. Also see the horizontal, project and history timeline makers.

Have classes? Draw them.

Free, no sign-up, 10 renders a day.

Generate my class diagram