PageSourceSearch

https://viztext.com/_next/static/chunks/0v9-5l57ry184.js

js viztext.com collected 2026-10-09 22:41:38 UTC 157,036 bytes, 135 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,29121,e=>{"use strict";e.s(["DEFAULT_LOCALE",0,"en","LOCALES",0,["en","zh"],"localizedPath",0,function(e,t){let a=t.startsWith("/")?t:`/${t}`;return"en"===e?a:`/${e}${"/"===a?"":a}`}])},24433,e=>{"use strict";var t=e.i(29121);let a=[{slug:"flowchart-from-text",relatedSlugs:["state-diagram-from-text","sequence-diagram-from-text","gantt-from-text","mindmap-from-text"]},{slug:"sequence-diagram-from-text",relatedSlugs:["class-diagram-from-text","flowchart-from-text","state-diagram-from-text"]},{slug:"erd-from-text",relatedSlugs:["class-diagram-from-text","flowchart-from-text","mindmap-from-text"]},{slug:"state-diagram-from-text",relatedSlugs:["flowchart-from-text","sequence-diagram-from-text","class-diagram-from-text"]},{slug:"class-diagram-from-text",relatedSlugs:["erd-from-text","sequence-diagram-from-text","state-diagram-from-text"]},{slug:"mindmap-from-text",relatedSlugs:["gantt-from-text","flowchart-from-text","erd-from-text","class-diagram-from-text"]},{slug:"gantt-from-text",relatedSlugs:["mindmap-from-text","flowchart-from-text","sequence-diagram-from-text","class-diagram-from-text"]},{slug:"chat-to-diagram",relatedSlugs:["flowchart-from-text","sequence-diagram-from-text","mindmap-from-text"]},{slug:"architecture-diagram-from-text",relatedSlugs:["flowchart-from-text","sequence-diagram-from-text","class-diagram-from-text"]},{slug:"uml-diagram-from-text",relatedSlugs:["class-diagram-from-text","sequence-diagram-from-text","state-diagram-from-text"]},{slug:"ai-diagram-from-text",relatedSlugs:["flowchart-from-text","sequence-diagram-from-text","mindmap-from-text"]},{slug:"ai-diagram-from-code",relatedSlugs:["uml-diagram-from-text","architecture-diagram-from-text","class-diagram-from-text"]},{slug:"ai-diagram-from-json",relatedSlugs:["erd-from-text","class-diagram-from-text","ai-diagram-from-code"]},{slug:"chatgpt-mermaid-fixer",relatedSlugs:["ai-diagram-from-text","chat-to-diagram","flowchart-from-text","sequence-diagram-from-text"]}],i=["auto","flowchart","sequence","erd","state","class","mindmap","gantt","arch"],r={auto:null,flowchart:"Flowchart",sequence:"Sequence",erd:"ERD",state:"State",class:"Class",mindmap:"Mindmap",gantt:"Gantt",arch:"Arch"},o={en:{"flowchart-from-text":{keyword:"text to flowchart ai",metaTitle:"Text to Flowchart AI — VizText",metaDescription:"Text to Flowchart AI — describe any process in plain English and get an editable Mermaid flowchart. Free, export SVG/PNG. No signup.",tagline:"Describe a process in plain English. Get a diagram. Export SVG or PNG.",examples:[{title:"User signup with email verification",prompt:"A user signup flow: enter email + password, send verification email, user clicks link, mark account active, redirect to dashboard."},{title:"E-commerce checkout with payment retry",prompt:"Checkout flow: cart review, address entry, payment method selection, charge card, on failure retry up to 3 times then show error, on success show order confirmation."},{title:"CI/CD deploy pipeline",prompt:"A CI/CD pipeline: developer pushes to main, run unit tests, if pass then build docker image, push to registry, deploy to staging, run smoke tests, on success promote to production."},{title:"Password reset flow",prompt:"Password reset: user enters email, backend generates one-time token, email sent, user opens link, enters new password twice, backend validates match and strength, updates password, redirects to login."}],useCase:`Flowcharts are the workhorse of process documentation. Reach for them when you need to explain how a system behaves step by step — with decision points, loops, and branching outcomes. They shine for user flows (signup, checkout, password reset), backend pipelines (CI/CD, order fulfillment, background jobs), and incident-response runbooks where an engineer needs to trace "what happens next" at a glance.
2
3Compared to a diagram drawn in Figma or draw.io, a Mermaid flowchart lives in plain text — it version-controls with the rest of your codebase, renders inline in GitHub READMEs and Notion pages, and stays in sync with the code because updating it is a one-line edit rather than a click-and-drag exercise.
4
5Where flowcharts start to break down: highly parallel systems (use a [sequence diagram](/sequence-diagram-from-text) to show message ordering across actors), or state-heavy objects where you care about legal transitions rather than sequential steps ([state diagrams](/state-diagram-from-text) are cleaner). If your "flowchart" has more than about 30 nodes, split it into two — readers get lost past that point.`,scenarios:[{icon:"Workflow",title:"Process & pipeline design",body:"Onboarding flows, deploy pipelines, order fulfillment — anywhere you need to draw a step-by-step happy path plus every branch that can fail or loop back."},{icon:"GitBranch",title:"Decision trees & branching logic",body:"When a spec has more than one 'if/then/else' at the top level, a flowchart shows the shape faster than prose. Product managers grok it, engineers ship it."},{icon:"Bug",title:"Bug tracing & incident postmortems",body:"Trace the exact code path that hit the exception. A flowchart of 'what happened' beats a wall of console logs when the on-call reviewer just landed."},{icon:"BookOpen",title:"Runbooks & onboarding docs",body:"New hires need to know 'when X breaks, do Y next'. A flowchart in the README makes tribal knowledge legible without a 45-minute Zoom call."},{icon:"Repeat",title:"Algorithm sketches",body:"Retry logic with exponential backoff, rate-limit token buckets, state machines drawn as flow — anywhere the code is easier to review as a diagram than as commented pseudocode."}],faq:[{q:"How does text to flowchart AI work?",a:"You type a prompt in plain English describing a process — for example, 'user signup with email verification' — and the AI generates a Mermaid flowchart with the correct nodes, decision diamonds, and edge labels. Behind the scenes we route your prompt through an LLM tuned for structural clarity; the model outputs valid Mermaid source, and the browser renders it live. No syntax to learn, no drawing tool to open."},{q:"What kinds of processes can I turn into a flowchart?",a:"Anything with steps and decision points. Popular categories: user flows (signup, checkout, password reset, KYC), CI/CD pipelines (build, test, deploy, rollback), incident response runbooks, order fulfillment, background job orchestration, and algorithm sketches (retry with exponential backoff, rate limiter, state transitions). If you can describe it as 'first this happens, then either this or that, then this loops back' — it fits."},{q:"Can I edit the flowchart after it's generated?",a:"Yes. Open the split view in the generator and the Mermaid source appears next to the rendered preview. Every keystroke re-renders the diagram in the canvas beside the editor. You can add nodes, change edge labels, tweak layout direction (top-down vs left-right), or restyle nodes as stadiums, cylinders, or diamonds. If you'd rather regenerate from a modified prompt, that also works — just add a sentence and rerun."},{q:"How do I export the flowchart to my docs or slides?",a:"SVG for lossless scaling into design docs, PDFs, and print. PNG for slides, Notion pages, and Slack. The export buttons live in the preview status bar. SVG is preferred whenever the target renderer supports it — the diagram stays crisp at any zoom level and the text remains selectable and searchable, which SEO and accessibility tools appreciate."},{q:"Is the text to flowchart AI free? Any usage limits?",a:"Yes, free. No signup, no watermark, no credit card. There is a generous per-IP daily rate limit to keep API costs sustainable; normal drafting activity will not hit it. If you do hit the limit, the UI displays the reset time. The rate limit is enforced with Upstash Redis and is consistent across all Vercel edge regions, so you cannot bypass it by reloading from a different device on the same IP."},{q:"Does the AI support Chinese prompts, or is it English only?",a:"Both. The generator detects the UI locale and passes it through to the LLM directive, so a Chinese prompt returns a Chinese-labeled flowchart. Mixed Chinese and English prompts also work — the AI picks the dominant language and labels the diagram consistently. If you prefer a specific language for labels, add 'reply in <language>' to the end of your prompt."}]},"sequence-diagram-from-text":{keyword:"AI sequence diagram from description",metaTitle:"AI Sequence Diagram Generator — VizText",metaDescription:"AI sequence diagram from description — describe an API call, login handshake, or system interaction. Get a Mermaid sequence diagram you can export.",tagline:"Turn an API description into a sequence diagram with actors and arrows.",examples:[{title:"OAuth 2.0 authorization code flow",prompt:"OAuth 2.0 authorization code flow: user clicks login on client app, redirected to auth server, logs in and consents, auth server returns authorization code to client via redirect, client exchanges code + secret for access token, uses token to call resource server API."}
5,{title:"Stripe checkout with webhook",prompt:"Stripe checkout flow: frontend creates payment intent via backend, backend calls Stripe API, Stripe returns client secret, frontend confirms payment on Stripe's side, Stripe sends webhook to backend on success, backend fulfills order and notifies frontend via WebSocket."},{title:"Distributed transaction with saga",prompt:"Saga pattern: order service creates order (pending), publishes event, payment service charges card and publishes result event, on success inventory service reserves stock, on failure payment service compensates by refunding. Order service listens for all events to finalize state."},{title:"WebSocket chat message delivery",prompt:"WebSocket chat message: client A sends message via WebSocket to server, server persists to database, server pushes message to client B (recipient) over their WebSocket, client B sends read receipt back, server updates message status and notifies client A."}],useCase:`Sequence diagrams are the sharpest tool when the story 
5is about ordering and timing between multiple actors. Reach for them any time you need to show "who calls whom, in what order, with what response" — API integrations, authentication handshakes (OAuth, SAML, JWT refresh), distributed system message flows, database transactions with locks, WebSocket / SSE push patterns.
6
7They're the go-to for engineering docs because they force you to name each actor explicitly — you can't hand-wave "the backend does something." Every arrow has a source, a target, and a message. This makes them ideal for architecture review docs and RFCs where the reader will pick apart every interaction.
8
9A rough rule: if you find yourself saying "and then, and then, and then" more than three times in your explanation, you want a sequence diagram, not a [flowchart](/flowchart-from-text). Sequence diagrams excel with async messages, activation bars showing when an actor is doing work, and notes annotating why a particular arrow matters. They struggle when the interaction is truly parallel with no meaningful ordering — in that case, a component diagram fits better.`,scenarios:[{icon:"FileText",title:"API integration docs",body:"When your REST or GraphQL API has multiple endpoints calling each other — auth, rate limiting, retries, webhooks. Sequence diagrams make every call traceable: who hit what, in what order, with what response."},{icon:"Lock",title:"Authentication & authorization handshakes",body:"OAuth 2.0, SAML, JWT refresh, WebAuthn — any protocol where multiple parties exchange signed tokens. A sequence diagram forces you to name each actor and every message. Ideal for security review docs."},{icon:"Network",title:"Distributed system message flows",body:"Microservice choreography, event-driven pipelines, message queues (Kafka / RabbitMQ), WebSocket / SSE push. When there's no single orchestrator, a sequence diagram shows which service publishes what and who consumes it."},{icon:"Database",title:"Database transactions & locking",body:"Multi-step transactions with read/write locks, optimistic concurrency, two-phase commit. Sequence diagrams clarify the exact order of BEGIN, SELECT FOR UPDATE, INSERT, COMMIT — and what happens on lock timeout."},{icon:"Zap",title:"Event-driven architectures",body:"Domain events fan out to subscribers, sagas coordinate long-running workflows, CQRS commands trigger event streams. A sequence diagram is often clearer than tracing spans when you want the whole story on one page."}]},"erd-from-text":{keyword:"AI ERD generator from description",metaTitle:"AI ERD Generator from Description — VizText",metaDescription:"ERD generator from description — describe entities and relationships (users, posts, comments) and get a Mermaid ER diagram with keys and cardinality.",tagline:"Describe entities and relationships. Get a Mermaid ERD with keys and cardinality.",examples:[{title:"Blog schema: users, posts, comments",prompt:"Blog database schema: users (id, email, name, created_at), posts (id, user_id FK, title, body, published_at), comments (id, post_id FK, user_id FK, body, created_at). A user can write many posts. A post has many comments. A user can leave many comments."},{title:"SaaS multi-tenant schema",prompt:"Multi-tenant SaaS: organizations (id, name, plan), users (id, org_id FK, email, role), workspaces (id, org_id FK, name), documents (id, workspace_id FK, author_id FK, title, content). Each organization has many users and workspaces. Each workspace has many documents. Users author many documents."},{title:"E-commerce: products, orders, line items",prompt:"E-commerce schema: customers (id, email), products (id, sku, name, price), orders (id, customer_id FK, total, status, placed_at), order_items (id, order_id FK, product_id FK, quantity, unit_price). Customer places many orders. Each order has many line items. Each item references one product."},{title:"Analytics event schema",prompt:"Product analytics schema: users (id, anonymous_id, identified_at), events (id, user_id FK, name, timestamp, properties json), sessions (id, user_id FK, started_at, ended_at, device), page_views (id, session_id FK, url, referrer, duration_ms)."}
9],useCase:`Entity relationship diagrams (ERDs) are how you communicate a database schema without dumping raw DDL on the reader. They show entities as tables, their columns with types, primary and foreign keys, and — critically — the cardinality of relationships (one-to-one, one-to-many, many-to-many).
10
11Reach for an ERD when you're designing a new schema before writing migrations, when you're onboarding an engineer to an existing codebase, or when you're writing an architecture doc that needs to justify why the data model looks the way it does. They're also invaluable when planning a migration or refactor — you can annotate which tables are being consolidated or split. If what you're describing is an object model rather than a set of tables, a [class diagram](/class-diagram-from-text) is the closer fit.
12
13Mermaid's erDiagram syntax uses crow's foot notation and supports column types, PK/FK markers, and relationship labels, which makes it detailed enough for real design docs. Where it falls short: it doesn't show indexes, constraints beyond keys, or physical storage details. For those, a full modeling tool like dbdiagram.io or an ORM's schema visualization tool goes deeper — but for the 90% of "let's talk about the shape of this data" conversations, an ERD in plain text you can commit alongside your migration files is exactly right.`,scenarios:[{icon:"Database",title:"New schema design",body:"Before you write the first migration, sketch tables, columns, and relationships. An ERD lets the whole team argue about naming and cardinality on one canvas instead of over five Slack threads."},{icon:"GitCompare",title:"Migration & refactor planning",body:"Splitting one users table into users + profiles + preferences? Annotate which columns move where. An ERD makes the before/after obvious, and reviewers can spot broken foreign keys in seconds."},{icon:"BookOpen",title:"Onboarding & architecture docs",body:"New engineers need to know 'where does the money live'. An ERD in the README, next to migration files, is the fastest way to answer 'which table joins to which' without paging through 40 model files."},{icon:"ShieldCheck",title:"Audit & compliance review",body:"SOC2, HIPAA, GDPR reviewers ask 'where is PII stored, and how does it flow?'. An ERD with PII columns annotated is a one-page answer that beats a spreadsheet of every field."},{icon:"Layers",title:"Normalization & performance review",body:"Denormalize for read speed? Add a materialized join table? An ERD helps you argue trade-offs visually — you can see the 3rd normal form vs the denormalized version side by side."}],faq:[{q:"How does the ERD generator work from a description?",a:"You describe entities and their relationships in plain English — for example, 'users write posts, posts have many comments, users can leave comments' — and the AI generates a Mermaid ER diagram with entities, primary keys, foreign keys, and cardinality (1:1, 1:N, M:N). No need to learn ERD syntax or open a schema design tool."},{q:"What information does the AI infer for each entity?",a:"The AI infers columns from context. When you mention 'users have email and password', those become columns; when you say 'posts have many comments', a foreign key `post_id` is added to comments. Primary keys default to `id BIGINT`; timestamps like `created_at` and `updated_at` are added automatically if you use words like 'audit' or 'timestamped'. Types are inferred by name (`email` → varchar, `price` → decimal, `is_active` → boolean)."},{q:"Can I model many-to-many relationships and junction tables?",a:"Yes. Describe it naturally: 'users can favorite posts' or 'tags belong to many posts, posts have many tags'. The AI adds the junction table with composite primary key and foreign keys back to both sides. You can also spell it out explicitly — 'add a favorites table with user_id and post_id' — and the AI honors the exact shape."},{q:"How do I export the ERD for my migration doc or PR?",a:"Export as SVG or PNG from the preview status bar. SVG works well in docs, README files, and Confluence — the diagram scales cleanly and its text is searchable. PNG is easier for Slack, Notion, and email. The underlying Mermaid source can also be c
13opied and pasted into any Mermaid-compatible renderer (GitHub markdown, Notion, Obsidian) so it stays in sync with your codebase."},{q:"Does the ERD support inheritance, polymorphism, or STI?",a:"Mermaid ER syntax doesn't have native inheritance arrows, but the AI models these patterns pragmatically: single-table inheritance becomes one table with a `type` discriminator column; class-table inheritance becomes a parent table plus per-subtype child tables with FK back. Polymorphic associations show as two nullable FK columns with a `type` string. If you want strict UML class semantics instead, use the class diagram generator."},{q:"Is the ERD generator free? Any signup needed?",a:"Quick mode is free with no signup, watermark, or credit card; a per-IP daily rate limit prevents abuse. Chat mode is also free but requires a Google account so it can keep conversation context. Enterprise or higher-volume use cases that need dedicated capacity can reach out via the contact page."}]},"state-diagram-from-text":{keyword:"AI state diagram generator from text",metaTitle:"AI State Diagram Generator from Text — VizText",metaDescription:"AI state diagram generator from text — describe a state machine (order lifecycle, feature flag, subscription) and get a Mermaid state diagram with transitions.",tagline:"Describe a state machine. Get a Mermaid state diagram with transitions.",examples:[{title:"Order lifecycle with cancel and refund",prompt:"Order lifecycle state machine: draft -> submitted -> paid -> shipped -> delivered. From draft user can cancel. From paid can refund. Failed payment transitions submitted back to draft. Cancelled and refunded are terminal states."},{title:"Feature flag rollout state",prompt:"Feature flag rollout state machine: draft -> internal_testing -> beta -> gradual_rollout -> stable. From any state can be rolled back to previous. From gradual_rollout can jump to killed if metrics regress. Killed is terminal."},{title:"Support ticket workflow",prompt:"Support ticket workflow: new -> triaged -> assigned -> in_progress -> waiting_customer -> resolved -> closed. From any non-terminal state can go to escalated. From resolved customer can reopen back to assigned within 7 days."},{title:"OAuth token lifecycle",prompt:"OAuth access token lifecycle: issued (fresh with expiry). issued -> expired after TTL. issued -> revoked if user logs out or admin invalidates. From expired can be refreshed back to issued if refresh token still valid. Revoked is terminal."}],useCase:`State diagrams are the right tool when what matters is the object's current condition and which transitions are legal from here, not the sequence in which things happen. Reach for them when you have a thing (an order, a document, a user account, a feature flag, a subscription) that moves through named states with clear rules about which state can follow which.
14
15The classic tell you need a state diagram: your team keeps arguing "wait, can a user be both suspended and pending-verification at the same time?" That's a question about state legality, not process order. A state diagram forces you to enumerate every state exactly once and every transition explicitly — which surfaces contradictions you'd otherwise ship as bugs.
16
17Mermaid's stateDiagram-v2 syntax supports composite states, concurrent regions, entry/exit actions, and the standard \`[*]\` start/terminal marker. Use it for order/subscription/document workflows, machine or IoT device modes, feature flag rollout phases, or any lifecycle that a compliance auditor might ask you to prove is bounded. Where state diagrams struggle: when interactions between multiple stateful objects dominate — then a [sequence diagram](/sequence-diagram-from-text) on top helps.`,scenarios:[{icon:"ToggleRight",title:"Form & wizard state",body:"Multi-step wizards, checkout funnels, onboarding. When 'draft', 'in review', 'approved', 'rejected' each have different UI and permissions, a state diagram is the source of truth."},{icon:"Cog",title:"Workflow & approval status",body:"PR review states, order lifecycle, ticket status. Any object that moves through named stages with rules about who can trigger which transition benefits from an explicit state diagram."},{icon:"RefreshCw",title:"Retry & recovery logic",body:"Job runs go pending → running → succeeded / failed / cancelled → retrying. When retry logic gets complex (ex
17ponential backoff, dead-letter), a state diagram is faster to reason about than the retry code."},{icon:"CircleDot",title:"UI component state",body:"Loading, empty, error, success — the four states of every screen. A state diagram makes the design system contract visible: which states does this component handle, and how do you transition between them."},{icon:"FileCode",title:"Protocol & machine specs",body:"TCP handshake, WebSocket connection lifecycle, hardware device modes. State diagrams have been the standard notation for protocol specs since Turing — because they're precise enough for implementation review."}]},"class-diagram-from-text":{keyword:"AI UML class diagram generator from text",metaTitle:"AI UML Class Diagram Generator — VizText",metaDescription:"AI UML class diagram generator from text — describe classes, attributes, methods, and inheritance and get a Mermaid UML class diagram for docs and reviews.",tagline:"Describe classes, attributes, and inheritance. Get a Mermaid UML class diagram.",examples:[{title:"Geometric shapes with abstract base",prompt:"UML class diagram for geometric shapes: abstract Shape with area() method, subclasses Circle (radius: double), Rectangle (width, height), Triangle (base, height). Each overrides area()."},{title:"Employee hierarchy with roles",prompt:"Employee class hierarchy: Person (name, email, phone). Employee extends Person (employeeId, salary, hireDate). Manager extends Employee (directReports list). Contractor extends Person (contractEnd, hourlyRate). Show visibility markers and getters."},{title:"E-commerce domain model",prompt:"E-commerce domain model: Customer has many Orders. Order has many LineItems. LineItem references a Product with unitPrice and quantity. Product has category, sku, price. Show associations with cardinality and key methods."},{title:"Payment processor with strategy pattern",prompt:"Payment processing using strategy pattern: PaymentProcessor uses a PaymentStrategy interface. Concrete strategies: StripeStrategy, PayPalStrategy, CryptoStrategy. Each implements charge(amount) and refund(txId). Show interface implementation and composition."}],useCase:"Class diagrams are the standard vocabulary for talking about software structure. Reach for them when you need to communicate the shape of an object-oriented codebase: which types exist, what attributes and methods they have, and how they relate through inheritance, composition, and association.\n\nWhere they shine: onboarding docs (\"here's how our domain model is organized\"), design RFCs proposing a new class hierarchy or refactor, and technical interviews where you need to sketch out a design in the whiteboard. They're also the go-to for documenting design patterns — factory, strategy, observer, visitor all have a canonical class diagram shape that readers recognize instantly. When the structure you're documenting is a database schema rather than an object model, an [ER diagram](/erd-from-text) is the closer fit.\n\nMermaid's classDiagram supports the full UML notation you'd expect: visibility markers (`+` public, `-` private, `#` protected, `~` package), abstract classes and methods, interfaces via the `<<interface>>` stereotype, generic types, and every relationship (inheritance `<|--`, composition `*--`, aggregation `o--`, association `--`, dependency `..>`). It stops short of full UML — no swimlanes, no full activity semantics — which for most engineering docs is a feature, not a bug. If you need those, you're probably reaching for the wrong tool.",scenarios:[{icon:"Box",title:"OOP domain model",body:"User, Order, Payment, Invoice — the nouns of your business. A class diagram is where they live: fields, methods, relationships. Anyone joining the team gets the mental model in 30 seconds."},{icon:"Layers",title:"DDD aggregates & bounded contexts",body:"Domain-driven design lives on class diagrams. Aggregate roots, value objects, entities, and the exact relationships between them — the diagram is the DDD spec."},{icon:"Library",title:"Library & SDK API design",body:"Before you publish v1.0, sketch the public API as a class diagram. Users grep the docs for the diagram to understand what's exp
17orted. Cleaner than tsdoc alone."},{icon:"GitPullRequest",title:"Refactor & migration mapping",body:"Extract this method, move that field, collapse these three classes into one. A before/after class diagram makes the refactor reviewable at a glance — hard to hide breaking changes."},{icon:"BookOpen",title:"Design pattern documentation",body:"Factory, Strategy, Observer, Visitor — every classic design pattern has a canonical class diagram shape. Reference these in your RFCs and readers recognize the pattern instantly."}]},"mindmap-from-text":{keyword:"text to mind map generator",metaTitle:"Text to Mind Map Generator — VizText",metaDescription:"Text to Mind Map Generator — turn a topic or outline into an interactive mind map. Fold branches, edit nodes, export SVG/PNG/Markdown/OPML.",tagline:"Describe a topic hierarchy. Get a Mermaid mindmap with nested branches.",examples:[{title:"Product launch checklist",prompt:"Mindmap for a product launch: Marketing (SEO, ads, social, PR, email), Engineering (backend, frontend, mobile, infra), Ops (support, billing, legal, compliance), Analytics (dashboards, funnels, cohort tracking). Add 2-3 leaves per branch."},{title:"Software architecture concerns",prompt:"Mindmap of software architecture concerns for a new SaaS: Reliability (SLO, monitoring, incident response), Scalability (caching, sharding, queues), Security (auth, secrets, audit), Cost (compute, egress, storage), DX (docs, dev env, CI speed)."},{title:"Interview prep for senior engineer",prompt:"Mindmap for senior software engineer interview prep: System design (databases, caching, queues, sharding, CDN, load balancing), Algorithms (arrays, trees, graphs, DP, greedy), Behavioral (leadership, conflict, growth), Domain knowledge (whatever the target company builds)."},{title:"Weekend hobby project ideas",prompt:"Mindmap of weekend project ideas: Learning (build a compiler, a database, a shell), Tools (workflow automation, dev productivity), Games (chess AI, roguelike, tower defense), Data (personal analytics, habit tracker, dashboards). Include estimated weekend count for each."}],useCase:`A text to mind map generator is the visual thinking tool for when you're trying to make an unstructured brain-dump legible. Reach for it at the earliest stage of planning any complex topic — before you have a real hierarchy, before you know which concerns are top-level, before an actual outline exists. Feed it a raw topic and let the AI-generated mind map surface the branches you had not yet named.
18
19Their strength is asymmetric: the tree structure is stronger than a bullet list at showing which ideas are peers and which are children, but weaker than a [flowchart](/flowchart-from-text) at showing sequence, and weaker than a [state diagram](/state-diagram-from-text) at showing rules. So use them when the "shape" of the ideas is the useful thing — during brainstorming, in interview scoping (junior engineers reason better with mindmaps than with prose), and when you're capturing the outline of a design doc before you commit to a structure.
20
21Mermaid's mindmap syntax uses indentation for hierarchy and supports different node shapes (rectangles, rounded, hexagons, circles) for visual distinction. It's intentionally spare compared to dedicated mindmap tools like XMind or MindMeister — no icons, no rich formatting, no drag-to-reorganize. That's the tradeoff for keeping it in plain text you can commit alongside code.`,scenarios:[{icon:"Lightbulb",title:"Brainstorming & ideation",body:"Kickoff meetings, feature ideation, whiteboarding a new product. Mindmaps capture divergent thinking better than lists — you can see the shape of what you know and what you're missing."},{icon:"Rocket",title:"Feature & release planning",body:"Break a big theme into workstreams. Marketing / engineering / support / analytics each get a branch, and every leaf is a concrete deliverable. A mindmap makes gaps visually obvious."},{icon:"Search",title:"Research & competitive analysis",body:"Sizing up a new market? Every competitor gets a node, every dimension (pricing / features / integrations / audie
21nce) gets a sub-branch. Faster than a spreadsheet for the exploration phase."},{icon:"MessagesSquare",title:"Meeting notes & recap",body:"During a discussion, capturing topics as a mindmap lets you jump between threads without losing where each was going. Post-meeting, the mindmap is easier to skim than linear notes."},{icon:"Sparkles",title:"Product vision & strategy docs",body:"The one-pager 'what is this company / product'. A mindmap forces you to be concrete about pillars, principles, and non-goals. Better than a wall of paragraphs."}],faq:[{q:"How does the text to mind map generator work?",a:"You give the AI a topic — a subject you want to study, a project you're planning, a book you're outlining — and it returns a structured mind map with a root topic and 3-5 branches, each with sub-branches 2-3 levels deep. Under the hood we route your prompt through an LLM tuned for hierarchical thinking; the model outputs markmap markdown (indented `#` levels), and the browser renders it into an interactive canvas you can fold, pan, and zoom."},{q:"What kinds of topics work well as mind maps?",a:"Anything that has a natural hierarchy. Popular categories: study notes (a historical era, a scientific field, a book chapter), project plans (product launch, wedding checklist, semester schedule), brainstorming (feature ideas, positioning angles, pros/cons for a decision), and content outlines (blog post, keynote talk, YouTube video). If you can imagine drawing a tree with a topic at the center and offshoots radiating out, it fits."},{q:"Can I interact with the mind map, or is it a static image?",a:"Interactive. Every node is clickable — click to fold or unfold its subtree, drag on empty canvas to pan, scroll or pinch to zoom. On mobile, tap to fold. The state is preserved when you edit and re-render, so exploring a large map does not reset your view. This is where markmap-based mind maps beat static SVG diagrams from tools like draw.io: 200+ node maps stay navigable."},{q:"How do I export the mind map to XMind or Obsidian?",a:"The generator exports four formats: SVG (lossless vector, drops into docs), PNG (raster, for slides and social), Markdown (the indented `#` source, editable in any markdown tool including Obsidian), and OPML (the outline standard that XMind, MindNode, and most outline tools import cleanly). OPML preserves the full hierarchy and text; SVG preserves the visual layout. Pick the one that matches your target tool."},{q:"Can I edit the mind map after generation?",a:"Yes. Switch to the split view and the markdown source appears next to the interactive canvas. Every edit re-renders in real time. Add a branch by typing a new `## `, deepen a level by adding another `#`, move a subtree by cut-and-paste. If you'd rather add content via natural language, re-run the prompt with your additions ('...and also cover the marketing budget') and the AI regenerates with the new scope."},{q:"Is the text to mind map generator free and unlimited?",a:"Free with a generous per-IP daily rate limit — enough for normal outlining and note-taking, not so unlimited that abusive scripts drain our LLM budget. No signup, no watermark, no credit card. If you hit the limit, the UI shows the reset time. The rate limit is enforced with Upstash Redis so it is consistent across all Vercel edge regions."}]}
21,"gantt-from-text":{keyword:"AI Gantt chart generator from text",metaTitle:"AI Gantt Chart Generator from Text — VizText",metaDescription:"AI Gantt chart generator from text — describe project phases, milestones, and dependencies. Get a Mermaid Gantt chart with dates and durations.",tagline:"Describe project phases and dependencies. Get a Mermaid Gantt chart.",examples:[{title:"MVP launch timeline (12 weeks)",prompt:"12-week MVP launch Gantt chart starting 2026-01-01. Phases: Research (2 weeks), Design (3 weeks, starts week 2 overlapping), Backend (5 weeks, after Design), Frontend (4 weeks, parallel with Backend from week 5), Testing (2 weeks, after all dev), Launch prep (1 week). Milestone at Launch."},{title:"Wedding planning timeline",prompt:"Wedding planning Gantt chart, 6 months out. Phases: Venue booking (weeks 1-3), Guest list (weeks 2-4), Invitations (weeks 5-8, after guest list), Vendor booking (weeks 3-10), Menu planning (weeks 8-12, after vendors), Final details (weeks 20-24), Wedding day at week 25."},{title:"Product feature Q1 roadmap",prompt:"Q1 product roadmap Gantt starting 2026-01-01: Feature A (design 2 weeks + build 4 weeks + launch 1 week), Feature B (design 1 week + build 3 weeks, starts week 5), Feature C (only 2 weeks build, starts week 8), Bug bash (last 2 weeks of quarter)."},{title:"Rocket launch countdown schedule",prompt:"Rocket launch countdown Gantt: L-30 days fueling prep, L-14 days final integration test, L-7 days weather assessment window opens, L-3 days launch rehearsal, L-1 day hold review, L-0 launch day (only 6 hours: pre-flight checks, fueling, terminal count, ignition, ascent). Milestone at ignition."}],useCase:"Gantt charts are the classical project management view. Reach for them when your audience needs to see three things at once: what phases exist, how they overlap in time, and where the dependencies are. They shine for engineering planning docs (\"here's our 12-week MVP timeline\"), stakeholder updates that need a visual TL;DR of \"when is this ready?\", and any pitch where you need to demonstrate you've thought through sequencing. If the phases themselves aren't settled yet, start with a [mind map](/mindmap-from-text) and turn it into a timeline once the shape holds.\n\nWhere they fall short: as living documents. A Gantt chart in a static doc is out-of-date the moment reality diverges from plan. Real teams that live in Gantt charts use dedicated tools (Asana, Monday, Jira Advanced Roadmaps) that auto-update from actual task status. Use Mermaid Gantt for the initial \"here's the plan\" artifact — the checkpoint at project kickoff — not for ongoing tracking.\n\nMermaid's gantt syntax supports date formats, section grouping, task durations, dependencies (`after taskId`), and milestones. It's intentionally simple c
21ompared to full PM tools — no resource assignment, no critical path highlighting, no exact-date-drag rescheduling. That's the tradeoff for something you can `git commit` and version-control alongside the code the roadmap describes.",scenarios:[{icon:"Calendar",title:"Project timeline & kickoff",body:"Six-week project, four workstreams, three milestones. A Gantt chart at kickoff makes 'when is this done' visible to everyone, not just the PM. Best for the plan-at-t-zero snapshot."},{icon:"Rocket",title:"Sprint & launch planning",body:"Marketing needs a landing page live by Tuesday, engineering ships the feature by Thursday, DevRel writes the blog post by Friday. A Gantt shows the dependencies before Slack thread #47 tries to."},{icon:"GitBranch",title:"Dependency tracking",body:"Task A blocks B, B blocks C. When there are more than 3 dependencies to track, a written list becomes unclear. A Gantt chart visualizes which tasks are on the critical path."},{icon:"Map",title:"Roadmap communication",body:"Quarter-level 'what are we shipping when'. Gantt is the language executives read — used for board updates, all-hands slides, and 'why is your quota this'."},{icon:"ShieldCheck",title:"Contract & SLA planning",body:"Client contracts with milestone-based payments, vendor SLAs with delivery dates. A Gantt chart is your source of truth for 'we said we'd have X by Y' — bring it to every progress review."}]},"chat-to-diagram":{keyword:"chat to diagram",metaTitle:"Chat to Diagram — AI Asks Questions, Draws for You (Free)",metaDescription:"Chat with AI to draw flowcharts, sequence diagrams, ERD, mind maps. AI asks 2-3 clarifying questions before drawing — better than one-shot for complex flows.",tagline:"Chat with AI to draw diagrams — no syntax, no guessing at the details.",examples:[{title:"Login flow with 2FA (chat mode)",prompt:"Draw a login flow. User enters email, then password, then a 2FA code. If 2FA fails, redirect to a reset page."},{title:"Order fulfillment sequence",prompt:"Sequence diagram: customer places order, gateway forwards to order service, order service writes to DB and calls notification service asynchronously."},{title:"Product launch mindmap",prompt:"Mind map for a SaaS launch: engineering, marketing, sales, support — each with 3-4 sub-tasks."},{title:"User signup with edge cases",prompt:"Draw the flow of user signup. Include email verification, password reset if forgot, and account lockout after 5 failed attempts."}],useCase:`Chat mode is the antidote to one-shot AI generation. Instead of guessing what you meant, the AI asks 2-3 clarifying questions — who are the actors, what are the events, is the call synchronous or asynchronous — before drawing anything.
22
23When the AI does draw, it also lists any assumptions it made in a confirmation card. If it added a return arrow you did not describe, an actor you did not mention, or a branch you did not intend, click Reject and the diagram redraws without that element.
24
25Chat mode is best for complex flows where a one-shot prompt would miss important details — a login flow with edge cases, a [sequence diagram](/sequence-diagram-from-text) with multiple services, a [state machine](/state-diagram-from-text) with lifecycle transitions. Reach for it when you want the AI to help you think through what to draw, not just execute a prompt verbatim.
26
27Everything else is the same as Quick mode — the same seven diagram types (flowchart, sequence, ERD, class, state, mindmap, Gantt), the same free tier, the same SVG / PNG / Markdown / OPML export. You can also mix the two: start with Quick to sketch a first draft, then switch to Chat to iterate on it. Both modes share the same underlying AI diagram generator.`,scenarios:[{icon:"Lightbulb",title:"Not sure how to phrase the prompt",body:"The AI's clarifying questions help you think through actors, events, and edge cases you may have missed. Better than staring at a blank input box wondering where to start."},{icon:"GitBranch",title:"Complex flow with many branches",body:"Multi-turn refinement lets you build up the diagram step by step. The AI tracks what you confirmed and what's still open, then draws everything at once."},{icon:"MessageSquare",title:"You want to double-check AI's assumptions",body:"Every generated diagram comes with a confirmation card listing anything the AI inferred. Reject anything wrong and the diagram redraws in seconds — no re-prompt needed."},{icon:"RefreshCw",title:"Iterating on a design review",body:"Chat mode is great for group design sessions — start with a rough description, refine as reviewers point out gaps. The AI keeps the conversation context across turns."},{icon:"Book",title:"Teaching or onboarding",body:"Show a new team member how a system works by letting them chat with the AI to derive the sequence diagram themselves. Better retention than reading finished docs."}],faq:[{q:"How is Chat mode different from Quick mode?",a:"Quick mode: one prompt in, one diagram out. Chat mode: AI asks 2-3 clarifying questions first, then draws. Use Quick when the flow is already clear in your head. Use Chat when you want the AI to help you think through actors, events, and edge cases."},{q:"How many questions does the AI ask before drawing?",a:"Typically 2-3, sometimes up to 4-5 for complex flows. There is a built-in budget so the AI will not ask forever. You can also type 'just draw it' at any point to skip remaining questions and let the AI use whatever context it already has."},{q:"What if the AI adds something I did not ask for?",a:"After drawing, the AI shows a confirmation card with anything it inferred — a return arrow, an actor, an edge c
27ase. Click Reject and the diagram redraws without that element. Click Accept and it's added to the diagram spec for the next iteration."},{q:"Which diagram types does Chat mode support?",a:"All seven — flowchart, sequence diagram, ERD, class diagram, state diagram, mindmap, and Gantt chart. Chat mode is deepest for sequence diagrams (actors + events + sync mode are structured slots); other types get lighter clarification but still benefit from the multi-turn refinement."},{q:"Is Chat mode free?",a:"Yes. Chat mode is free for logged-in users, with a generous daily rate limit that resets every 24 hours. Anonymous users can use Quick mode without signing in. Both modes share the same free tier."}]},"architecture-diagram-from-text":{keyword:"AI architecture diagram generator",metaTitle:"AI Architecture Diagram Generator — VizText",metaDescription:"Describe your system in plain English — services, databases, gateways, queues — and get an editable Mermaid architecture diagram. Free, export SVG/PNG.",tagline:"Describe your system's components and how they talk to each other. Get a layered architecture diagram.",examples:[{title:"Three-tier web app on AWS",prompt:"Architecture diagram for a web app on AWS: CloudFront CDN in front of an Application Load Balancer, routing to an ECS Fargate service running the API, which reads and writes to an RDS Postgres database and caches hot reads in ElastiCache Redis. Static assets served from S3."},{title:"Microservices with event bus",prompt:"Microservices architecture: API gateway in front of order service, payment service, and inventory service. Order service publishes events to Kafka, consumed by inventory service and a notification service. Each service owns its own Postgres database."},{title:"Serverless data pipeline",prompt:"Serverless data pipeline: S3 upload triggers a Lambda that validates the file and writes raw data to a data lake in S3, publishing an event to EventBridge. A second Lambda consumes that event, transforms the data, and loads it into a Redshift warehouse for analytics."},{title:"Mobile backend with auth",prompt:"Mobile app backend architecture: iOS and Android clients call an API gateway, which forwards to an auth service backed by Cognito, and a core API service backed by DynamoDB. Push notifications go through SNS. Static content is served from CloudFront and S3."}],useCase:`Architecture diagrams answer one question at a glance: what are the pieces of this system, and how do they talk to each other? Reach for one when you're writing a design doc that needs a birds-eye view before it dives into detail, when you're onboarding an engineer who needs "where does a request go" in ten seconds, or when you're presenting a proposed system to stakeholders who won't read a wall of bullet points.
28
29Where architecture diagrams differ from [flowcharts](/flowchart-from-text): a flowchart shows a process unfolding over time (step 1, then step 2, then a decision); an architecture diagram shows a system's static shape (this service calls that service, this queue sits between these two). The AI reads your description of components — gateways, services, databases, queues, caches, CDNs — and lays them out in layers (edge, compute, data) with labeled connections, using stadiums, cylinders, and rectangles to distinguish node kinds the way a whiteboard sketch would.
30
31One honest limitation: the diagram uses generic labeled shapes, not official AWS/GCP/Azure icon sets — Mermaid doesn't ship vendor iconography, so "RDS" or "S3" show up as clearly labeled cylinder/rectangle nodes rather than branded logos. For a quick internal design doc or an RFC that needs to communicate shape and data flow, this is exactly enough; for a client-facing slide deck that needs official cloud icons, you'll want to trace the generated layout into a tool like Lucidchart afterward.`,scenarios:[{icon:"LayoutTemplate",title:"System design docs & RFCs",body:"Before you write the detailed sections, give reviewers the shape of the system in one diagram. An architecture diagram at the top of an RFC saves ten Slack threads asking 'wait, what talks to what?'"}
31,{icon:"Cloud",title:"Cloud infrastructure planning",body:"Sketch a proposed AWS/GCP/Azure setup before you provision anything. Reviewers can spot a missing cache layer or an unnecessary hop faster on a diagram than in a Terraform plan."},{icon:"BookOpen",title:"Onboarding & architecture overviews",body:"New engineers ask 'how does a request flow through this system' on day one. An architecture diagram in the README answers it before they open a single file."},{icon:"ShieldCheck",title:"Security & vendor review",body:"Auditors and security reviewers want to see the trust boundaries — what's public-facing, what's internal, where data crosses a boundary. A labeled architecture diagram is the fastest way to answer 'show me the attack surface.'"},{icon:"GitCompare",title:"Migration & modernization planning",body:"Moving from a monolith to microservices, or from self-hosted to managed services? A before/after architecture diagram makes the migration plan concrete and reviewable."}],faq:[{q:"How does the AI architecture diagram generator work?",a:"You describe your system in plain English — the services, databases, queues, and gateways involved and how they connect — and the AI generates a Mermaid flowchart-style diagram with components grouped into layers (edge, compute, data) and labeled connections. There's no separate 'architecture' rendering engine; under the hood it uses the same flowchart syntax with conventions (cylinders for storage, subgraphs for layers) tuned specifically for system diagrams."},{q:"Does it use official AWS, GCP, or Azure icons?",a:"No. Mermaid doesn't ship vendor icon sets, so components render as clearly labeled shapes — cylinders for databases and storage, rectangles for compute and services, stadiums for gateways — rather than branded cloud logos. This keeps the diagram provider-agnostic and fast to generate; if you need official iconography for a client deck, use this as your first-draft layout and re-skin it in a tool like Lucidchart or draw.io."},{q:"Can I describe a multi-cloud or hybrid system?",a:"Yes. The AI doesn't care which cloud a component belongs to — describe an on-prem database talking to a cloud-hosted API, or a system spanning AWS and GCP, and it draws the connections as described. Naming the provider in your prompt (e.g. 'S3', 'GCS', 'on-prem Postgres') helps the AI label nodes accurately."},{q:"How detailed can the architecture diagram get before it becomes unreadable?",a:"Past roughly 15-20 components in one diagram, readability drops fast — the same rule of thumb as flowcharts. For large systems, describe one bounded context or one layer at a time (e.g. 'just the payment subsystem') and generate several focused diagrams rather than one sprawling map."},{q:"Can I edit the generated diagram?",a:"Yes. The split view shows the Mermaid source next to the live preview — add a service, rename a connection, or regroup layers by editing text. If you'd rather regenerate, add a sentence to your original prompt and rerun it."},{q:"Is the architecture diagram generator free?",a:"Yes, free with no signup. A generous per-IP daily rate limit (enforced via Upstash Redis, consistent across all Vercel edge regions) prevents abuse without affecting normal usage. Export as SVG for docs or PNG for slides, straight from the preview status bar."}]},"uml-diagram-from-text":{keyword:"AI UML diagram generator",metaTitle:"AI UML Diagram Generator — VizText",metaDescription:"Describe classes, a login sequence, or a lifecycle in plain English. The AI picks the right UML diagram — class, sequence, or state — and draws it.",tagline:"Describe your design. The AI figures out whether it's a class, sequence, or state diagram.",examples:[{title:"Class diagram: library system",prompt:"UML class diagram for a library system: Book (isbn, title, author), Member (id, name, email), Loan (dueDate, returnedDate) links a Member to a Book. Librarian extends Member with canManageCatalog boolean. Show associations and cardinality."},{title:"Sequence diagram: login handshake",prompt:"UML sequence diagram for a login handshake: client sends credentials to auth service, auth service verifies against the user database, on success issues a JWT, client stores the token and uses it for subsequent API calls."},{title:"State diagram: order lifecycle",prompt:"UML state diagram for an order: created -> paid -> shipped -> delivered. From created, can be cancelled. From paid, can be refunded. Cancelled and refunded are terminal."},{title:"Class diagram: strategy pattern",prompt:"UML class diagram using the strategy pattern: PaymentProcessor depends on a PaymentStrategy interface. Concrete strategies StripeStrategy and PayPalStrategy each implement charge(amount). Show the interface, implementations, and the composition relationship."}],useCase:`The full UML specification defines 14 diagram types, but in day-to-day engineering work, three do almost all the heavy lifting: [class diagrams](/class-diagram-from-text) (structure — what types exist, what they have, how they relate), [sequence diagrams](/sequence-diagram-from-text) (behavior over time — who calls whom, in what order), and [state diagrams](/state-diagram-from-text) (behavior over state — what states exist, which transitions are legal). This page is a UML hub: describe your design in plain English and the AI figures out which of the three fits, then draws it.
32
33Reach for a class diagram when the question is "what does the type system look like" — domain models, DDD aggregates, library APIs. Reach for a sequence diagram when the question is "what's the order of calls between actors" — API handshakes, distributed transactions, authentication flows. Reach for a state diagram when the question is "what states can this object be in, and what moves it between them" — order lifecycles, workflow statuses, protocol states.
34
35If you already know exactly which of the three you need, the dedicated pages (class diagram generator, sequence diagram generator, state diagram generator) go deeper on that one type — more examples, a longer syntax rundown, and type-specific FAQ. This page is for when you know you want "a UML diagram" but haven't decided which shape the answer takes — describe the design, and let the AI choose.`,scenarios:[{icon:"Box",title:"OOP design docs",body:"Not sure yet whether your design doc needs a structure view or a behavior view? Describe the design in plain English and let the AI classify it — you can always regenerate as a different UML type if it guesses wrong."},{icon:"Layers",title:"Architecture & code review prep",body:"Before a design review, sketch the relevant classes, the critical call sequence, or the object's lifecycle — whichever best explains the change you're proposing."},{icon:"GraduationCap",title:"Learning & teaching UML",body:"Students and bootcamp instructors use this to see canonical UML notation quickly — visibility markers, arrow types, lifelines — without opening a UML modeling tool."},{icon:"PenTool",title:"Technical interview whiteboarding",body:"Sketch a class hierarchy or a sequence of API calls the way you'd draw it on a whiteboard, then export it to include in a take-home submission or portfolio."},{icon:"BookOpen",title:"Design pattern documentation",body:"Factory, strategy, observer, and other classic patterns each have a canonical UML shape. Describe the pattern and get the standard diagram other engineers will recognize instantly."}
35],faq:[{q:"Which UML diagram types does this support?",a:"Three: class diagrams, sequence diagrams, and state diagrams — the three UML types engineering teams actually use day to day. This page doesn't generate use case, activity, component, or deployment diagrams; the full UML spec has 14 types, and Mermaid (the rendering engine underneath) only implements a practical subset."},{q:"How does the AI decide which UML diagram to draw?",a:"It reads your description for structural language ('has a', 'extends', 'implements' → class), interaction language ('sends', 'calls', 'responds' → sequence), or lifecycle language ('transitions to', 'moves from X to Y' → state) and classifies accordingly. If you want to guarantee a specific type, use the dedicated class/sequence/state diagram page instead — it locks the type so there's no ambiguity."},{q:"What if the AI picks the wrong diagram type?",a:"Regenerate with more explicit language ('draw a sequence diagram of...') or jump to the dedicated page for that type, which skips classification entirely and always draws that shape."},{q:"Does it support full UML notation — visibility markers, stereotypes, multiplicity?",a:"Yes for the supported subset: visibility markers (+/-/#/~), the <<interface>> stereotype, generics, and all standard relationship arrows for class diagrams; activation bars, async messages, and notes for sequence diagrams; composite states and the [*] start/end marker for state diagrams."},{q:"Can I edit the generated UML diagram?",a:"Yes. Every diagram opens in a split view with the Mermaid source next to the live render — edit the text directly, or add a sentence to your prompt and regenerate."},{q:"Is it free?",a:"Yes, free with no signup and a generous per-IP daily rate limit. Export as SVG or PNG from the preview status bar."}]},"ai-diagram-from-text":{keyword:"AI diagram generator from text",metaTitle:"AI Diagram Generator From Text — VizText",metaDescription:"Describe anything in plain English. The AI picks the right diagram type — flowchart, sequence, ERD, class, state, mindmap, or Gantt — and draws it.",tagline:"Describe anything in plain text. Get the diagram type that fits — no need to know which one you want first.",examples:[{title:"Onboarding flow (auto-classified as flowchart)",prompt:"New employee onboarding: HR sends offer letter, candidate signs, IT provisions laptop and accounts, manager schedules first-week 1:1s, employee completes compliance training by day 5."},{title:"Webhook delivery (auto-classified as sequence)",prompt:"Webhook delivery: our backend sends an event to the customer's webhook URL, if the customer's server returns a non-200 we retry with exponential backoff up to 5 times, then move the event to a dead-letter queue."},{title:"Quarterly roadmap (auto-classified as mindmap)",prompt:"Q2 roadmap mindmap: Platform (auth revamp, billing v2), Growth (SEO, referral program), Mobile (offline mode, push notifications), Support (help center rewrite, live chat pilot)."},{title:"Sprint plan (auto-classified as Gantt)",prompt:"Two-week sprint Gantt: design (days 1-2), backend build (days 2-6), frontend build (days 4-8, overlaps backend), QA (days 8-9), release (day 10)."}],useCase:`VizText covers seven diagram types under the hood — flowchart, sequence, ERD, class, state, mindmap, and Gantt — plus architecture diagrams built on the flowchart engine. This page is the entry point for when you have a description in your head but haven't decided which of those shapes fits it best. Type your description and the AI classifies it: process descriptions become [flowcharts](/flowchart-from-text), actor-to-actor interactions become [sequence diagrams](/sequence-diagram-from-text), hierarchical outlines become [mindmaps](/mindmap-from-text), and so on.
36
37This matters because most people don't think in diagram-type taxonomy — they think "I need to explain how our signup works" or "I need to show the shape of our Q2 plan," not "I need a flowchart" or "I need a mindmap." Auto-classification means you can describe the thing you actually care about and let the tool handle the translation into diagram vocabulary.
38
39If you already know exactly which diagram type you want, the dedicated per-type pages (flowchart, sequence, ERD, class, state, mindmap, Gantt, architecture) go deeper on that one type — more examples tuned to it, syntax notes, and type-specific FAQ. Use this page for the "just describe it and see what comes out" workflow, and the type-specific pages when you already know the shape of the answer.`,scenarios:[{icon:"Sparkles",title:"Quick prototyping without deciding a type first",body:"You have a description, not a diagram-type decision. Paste it here and let the classifier pick — faster than reading seven landing pages to figure out which one applies."},{icon:"BookOpen",title:"Documentation hubs for mixed content",body:"A team wiki that needs flowcharts, sequence diagrams, and mindmaps side by side doesn't need seven different tools — one generator that classifies and draws all of them keeps the workflow consistent."},{icon:"NotebookText",title:"Note-taking & knowledge base diagrams",body:"Turning meeting notes or a stream-of-consciousness description into a visual on the spot, without first categorizing what kind of visual it should be."},{icon:"GraduationCap",title:"Teaching & explaining concepts visually",body:"Instructors describing a concept out loud can paste the same description here and get whichever diagram shape best matches — useful when the 'right' diagram type isn't obvious to a non-technical audience."},{icon:"Users",title:"Non-engineers exploring diagramming",body:"Product managers and designers who don't know Mermaid syntax — or diagram-type names — can describe what they want in plain language and let the AI handle classification."}],faq:[{q:"How does auto-classification decide the diagram type?",a:"The AI reads your description for structural cues — steps and decisions suggest a flowchart, named actors exchanging messages suggest a sequence diagram, entities with relationships suggest an ERD, a hierarchy of topics suggests a mindmap, dated phases suggest a Gantt chart — and picks the closest fit before generating."},{q:"Can I force a specific diagram type instead of letting the AI choose?",a:"Yes. Use one of the type-specific pages (flowchart, sequence, ERD, class, state, mindmap, Gantt, or architecture diagram from text) — each one locks the type so there's no classification step, or pick a type explicitly from the picker on the home page before typing your prompt."},{q:"How accurate is the auto-classification?",a:"Accurate for clearly-worded descriptions in one of the seven supported categories. Ambiguous descriptions (e.g. a process that's also somewhat hierarchical) may get classified either way — if the result isn't what you wanted, regenerate with a type explicitly selected."},{q:"Which diagram types are supported?",a:"Seven core types — flowchart, sequence diagram, entity relationship diagram (ERD), UML class diagram, state diagram, mindmap, and Gantt chart — plus architecture diagrams, which use the flowchart engine with layered layout conventions."},{q:"Can I edit the result after it's generated?",a:"Yes, every diagram opens in a split view with editable Mermaid (or markmap, for mindmaps) source next to the live preview."},{q:"Is it free?",a:"Yes, free with no signup and a generous per-IP daily rate limit enforced via Upstash Redis. Export SVG, PNG, and — for mindmaps — Markdown or OPML too."}]},"ai-diagram-from-code":{keyword:"AI diagram from code",metaTitle:"AI Diagram From Code — VizText",metaDescription:"Paste a code snippet and get a class diagram, flowchart, or architecture diagram. No AST parser to install, no repo to clone — just paste and draw.",tagline:"Paste a code snippet. Get a class diagram, flowchart, or architecture diagram back.",examples:[{title:"TypeScript class hierarchy → class diagram",prompt:"Draw a UML class diagram from this code: abstract class Shape { abstract area(): number }
39 class Circle extends Shape { constructor(private radius: number) { super() } area() { return Math.PI * this.radius ** 2 } } class Rectangle extends Shape { constructor(private w: number, private h: number) { super() } area() { return this.w * this.h } }"},{title:"Express route chain → flowchart",prompt:"Draw a flowchart of this Express route handler's control flow: router.post('/checkout', authenticate, validateCart, async (req, res) => { const total = calculateTotal(req.body.items); if (total <= 0) return res.status(400).send('empty cart'); const charge = await chargeCard(req.user, total); if (!charge.success) return res.status(402).send('payment failed'); const order = await createOrder(req.user, req.body.items); res.json(order); })"},{title:"Recursive function → flowchart",prompt:"Draw a flowchart for this function: function quicksort(arr) { if (arr.length <= 1) return arr; const pivot = arr[0]; const left = arr.slice(1).filter(x => x < pivot); const right = arr.slice(1).filter(x => x >= pivot); return [...quicksort(left), pivot, ...quicksort(right)]; }"},{title:"docker-compose services → architecture diagram",prompt:"Draw an architecture diagram from this docker-compose.yml: services are 'web' (nginx, exposes 80, depends on 'api'), 'api' (node app, depends on 'db' and 'redis'), 'db' (postgres, volume mounted), 'redis' (cache), and 'worker' (background job processor, depends on 'redis' and 'db')."}],useCase:`Sometimes the fastest way to explain a piece of code is a picture, and the fastest way to get that picture isn't opening a dedicated static-analysis tool — it's pasting the snippet and describing what you want drawn. This page is for that workflow: paste a class definition and ask for a [class diagram](/class-diagram-from-text), paste a route handler and ask for a flowchart of its control flow, paste a docker-compose file and ask for the service topology as an [architecture diagram](/architecture-diagram-from-text).
40
41Be precise about what you're asking for — "draw a class diagram from this code" gets a different (and better) result than just pasting code with no instruction, because the AI reads code the way an engineer skimming a diff does: semantically, not by building a formal AST. That's the honest tradeoff versus a dedicated code-to-UML tool: no build step, no language server, works on any language the model understands (JavaScript, TypeScript, Python, Java, Go, Rust, and more) — but it's a best-effort reading, not a guaranteed-correct static analysis. For a quick PR review comment or an onboarding doc, that's the right tradeoff; for a diagram that must be pixel-perfect against the actual type system, review the output before you rely on it.
42
43Keep the pasted snippet scoped — one class hierarchy, one function, one docker-compose file — rather than an entire repository. The tool reads what fits in a prompt, not a whole codebase; for large-scale reverse engineering across dozens of files, this is a starting point for individual pieces, not a full-repo visualizer.`,scenarios:[{icon:"Archive",title:"Legacy code archaeology",body:"Inherited a file with no docs and unclear class relationships? Paste it and ask for a class diagram — faster than tracing inheritance by hand across multiple files."},{icon:"GitPullRequest",title:"PR review visual aid",body:"A gnarly control-flow change is easier to review as a flowchart than as a diff. Paste the new function into a comment-ready diagram before the review call."},{icon:"BookOpen",title:"Onboarding to an unfamiliar codebase",body:"New hires paste the core domain classes or the main request handler and get a diagram instead of reading 500 lines cold."},{icon:"GitCompare",title:"Refactor planning",body:"Before splitting a god class into smaller pieces, diagram the current structure so the 'before' state is documented and reviewable."},{icon:"GraduationCap",title:"Teaching code structure",body:"Instructors turn a student's (or a textbook's) code sample into a visual on the fly — useful for explaining inheritance, control flow, or service boundaries without a whiteboard."}],faq:[{q:"How accurate is a diagram generated from pasted code?",a:"It's a best-effort semantic reading by an LLM, not a formal AST-based static analysis. For clear, well-structured code it's reliably accurate; for code with heavy metaprogramming, dynamic typing tricks, or deeply nested logic, review the output — treat it as a strong first draft, not ground truth."},{q:"Which programming languages are supported?",a:"Any language the underlying model can read — JavaScript, TypeScript, Python, Java, Go, Rust, C#, Ruby, and most mainstream languages work well. There's no language server or compiler involved, so even pseudocode or a partial snippet works, just with less precision."},{q:"Can I paste an entire repository or a large file?",a:"Paste what fits comfortably in a single prompt — a class, a function, a route handler, a docker-compose file. This is a snippet-to-diagram tool, not a whole-repo visualizer; for large-scale architecture mapping, diagram one bounded piece at a time."},{q:"What diagram types can I get from code?",a:"Class diagrams (from class/interface definitions), flowcharts (from function control flow), and architecture diagrams (from service definitions like docker-compose or infra config). Say which one you want in your prompt for the best result."},{q:"Can I edit the generated diagram?",a:"Yes. The Mermaid source opens next to the live preview in a split view — edit directly, or refine your original prompt and regenerate."},{q:"Is this free?",a:"Yes, free with no signup and a generous per-IP daily rate limit. Export as SVG or PNG from the preview status bar."}]},"ai-diagram-from-json":{keyword:"AI diagram from JSON",metaTitle:"AI Diagram From JSON — VizText",metaDescription:"Paste a JSON payload, schema, or API response and get an ERD or class diagram showing the implied entities and relationships. Free, export SVG/PNG.",tagline:"Paste JSON — an API response, a schema, a document sample. Get an ERD or class diagram back.",examples:[{title:"Nested API response → E
43RD",prompt:'Draw an ERD from this JSON API response, treating nested objects as related entities: { "order": { "id": 123, "customer": { "id": 9, "email": "[email protected]" }, "items": [ { "productId": 55, "name": "Widget", "quantity": 2, "unitPrice": 9.99 } ], "total": 19.98 } }'},{title:"JSON Schema → ERD with types",prompt:'Draw an ERD from this JSON Schema: { "User": { "id": "integer", "email": "string", "posts": { "type": "array", "items": { "$ref": "Post" } } }, "Post": { "id": "integer", "title": "string", "authorId": "integer", "comments": { "type": "array", "items": { "$ref": "Comment" } } }, "Comment": { "id": "integer", "body": "string", "postId": "integer" } }'},{title:"MongoDB document sample → ERD",prompt:'Draw an ERD from this MongoDB document, showing embedded sub-documents as owned entities and any ObjectId fields as foreign key references: { "_id": "...", "customerId": "...", "shippingAddress": { "street": "...", "city": "..." }, "lineItems": [ { "sku": "...", "qty": 2 } ], "status": "paid" }'},{title:"OpenAPI schema snippet → class diagram",prompt:"Draw a UML class diagram from this OpenAPI component schema: UserDTO { id: integer, email: string, roles: string[] }, CreateUserRequest { email: string, password: string }, UserResponse extends UserDTO { createdAt: string }. Show inheritance and composition."}],useCase:'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](/erd-from-text) when the shape is relational (entities with implied foreign keys), or a [class diagram](/class-diagram-from-text) when the shape is closer to a typed object model (DTOs, request/response shapes with inheritance).\n\nThe 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.\n\nThis 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.',scenarios:[{icon:"FileJson",title:"API response documentation",body:"A deeply nested API response is hard to read as raw JSON in a doc. Paste it here and drop the resulting ERD into your API reference instead."},{icon:"Database",title:"NoSQL / document database schema docs",body:"MongoDB and other document stores don't enforce a schema the way SQL does — pasting real document samples and visualizing the implied structure is often the only way to document what's actually being stored."},{icon:"Bug",title:"Debugging deeply nested payloads",body:"When a bug report includes a huge JSON payload, a diagram of its entities is faster to reason about than scrolling through indentation."},{icon:"ClipboardCheck",title:"API design review before building",body:"Sketch your planned response shape as JSON first, visualize it, and get feedback on the data model before you write a single line of backend code."},{icon:"Handshake",title:"Frontend/backend data contract docs",body:"When frontend and backend teams need to agree on a payload shape, a diagram of the agreed JSON structure is a clearer contract than a Slack thread of examples."}],faq:[{q:"How does the AI infer entities and relationships from raw JSON?",a:"Nested objects become related (embedded or foreign-key) entities depen
43ding on context, arrays of objects become one-to-many relationships, and ID-shaped fields (userId, authorId, an ObjectId) become foreign keys even without explicit schema annotations. For JSON Schema input with $ref pointers, those references are honored directly rather than inferred."},{q:"Does it support JSON Schema with $ref?",a:"Yes. Paste a JSON Schema document with $ref pointers between definitions and the AI treats each referenced definition as its own entity, connected by the relationship implied by the reference (array of refs → one-to-many, single ref → one-to-one or many-to-one depending on context)."},{q:"What's the difference between this and the ERD generator page?",a:"The ERD generator (erd-from-text) starts from a plain-English description of your schema. This page starts from actual JSON — a real API response, schema file, or document sample — and reverse-engineers the entity structure from it. Use whichever matches what you already have: a description, or real data."},{q:"Can it get the cardinality wrong?",a:"For genuinely ambiguous JSON — a nested object that could be either embedded data or a normalized reference — the AI makes its best inference. Treat the result as a strong starting point and correct the cardinality in the split-view editor if it doesn't match your actual data model."},{q:"Do I get an ERD or a class diagram?",a:"Whichever fits your description of what you want — say 'draw an ERD' for a relational/database view, or 'draw a class diagram' for a typed object-model view (useful for DTOs, request/response shapes with inheritance). If you don't specify, the AI infers from context."},{q:"Is this free?",a:"Yes, free with no signup and a generous per-IP daily rate limit. Export SVG or PNG from the preview status bar."}]},"chatgpt-mermaid-fixer":{keyword:"chatgpt mermaid fixer",h1:"ChatGPT Mermaid Fixer",metaTitle:"ChatGPT Mermaid Fixer — Render & Fix ChatGPT's Mermaid Code Free",metaDescription:"ChatGPT writes Mermaid but cannot draw it. Paste its output here to render, edit and export SVG/PNG — plus the prompts that make ChatGPT emit clean syntax. Free.",tagline:"ChatGPT writes the Mermaid. This draws it — paste, fix the syntax, edit, export.",ctaCode:`flowchart TD
44    A[User opens login page] --> B[Enter email and password]
45    B --> C{Credentials valid?}
46    C -->|No| D[Show error]
47    D --> B
48    C -->|Yes| E{2FA enabled?}
49    E -->|No| H[Create session]
50    E -->|Yes| F[Send 6-digit code]
51    F --> G{Code correct?}
52    G -->|No| F
53    G -->|Yes| H
54    H --> I[Redirect to dashboard]`,comparison:{heading:"Where ChatGPT stops, and what happens here",stepLabel:"Step",colA:"In the ChatGPT window",colB:"On this page",rows:[{step:"Turning a description into Mermaid",a:"Strong — this is the part it is good at. Describe the flow in plain English and it writes Mermaid that is usually close to correct.",b:"Same job, built in. But if ChatGPT already wrote the code, skip this step entirely and paste it."},{step:"Seeing the actual picture",a:"The chat shows Mermaid as a fenced code block. The window renders Markdown, not diagrams, so you read the syntax instead of looking at the shape.",b:"The canvas draws it as the code lands. No copy step, no third tool in between."},{step:"Finding out the code is broken",a:"The block looks fine either way. A missing bracket and a valid diagram are visually identical until something tries to render it.",b:"You find out immediately: it either draws, or the preview says it could not."},{step:"Fixing a syntax error",a:"Paste the error back and ask again. Sometimes it patches the one line; sometimes it returns a rewritten diagram with different node names.",b:"The error names the line it failed on and points at the character. The source sits in an editor beside the canvas, so you change that line and it re-renders as you type, with the rest of the diagram untouched."},{step:"Changing one node",a:"You describe the change and get a whole new diagram back, including the parts you were already happy with.",b:"Edit that line directly, or ask in Chat mode for a targeted change to the diagram already on the canvas."},{step:"Getting a file out",a:"Not available in the chat window. You copy the code out and go find something that renders it.",b:"SVG, PNG, or the Mermaid source, from the preview status bar."}],note:"Not affiliated with, endorsed by, or sponsored by OpenAI. ChatGPT is a trademark of OpenAI. This table describes two halves of one workflow rather than two competing products — the Mermaid that ChatGPT writes still needs somewhere to render, and that is the gap this page fills. Behaviour described 
54in the left column reflects the ChatGPT web interface at the time of writing."},examples:[{title:"Login flow with 2FA and lockout",prompt:"Flowchart of a login flow: email and password, then a 2FA code if enabled. Wrong password shows an error and returns to the form. Lock the account after 5 failed attempts."},{title:"Microservice request path",prompt:"Sequence diagram: browser calls the API gateway, gateway authenticates against the auth service, then calls the order service, which writes to Postgres and publishes an event to Kafka."},{title:"Database schema from a feature spec",prompt:"ERD for a blogging platform: users write posts, posts have comments and tags, tags are many-to-many with posts. Include primary and foreign keys."},{title:"Order lifecycle state machine",prompt:"State diagram for an order: created, paid, packed, shipped, delivered. Payment can fail back to created, and anything before shipped can be cancelled."}],useCase:`Ask ChatGPT for a diagram and you get text, not a picture. Usually that text is Mermaid — a plain-text diagram syntax that looks like "flowchart TD / A[Start] --> B[End]". Sometimes it is ASCII art, sometimes it is a numbered description of boxes and arrows. What you almost never get is something you can paste into a document.
55
56That is not a bug in your prompt. The ChatGPT chat window has no Mermaid renderer built in. It can produce raster images through its image model, but those come out as flat pictures with garbled text in the boxes and no way to move a node or fix a typo. For anything that has to live in a design doc, a README, or a slide, the Mermaid path is the right one — you just need something on the other end that turns the syntax into an actual diagram. That is what this ChatGPT Mermaid fixer is for: paste what ChatGPT gave you, see it rendered, then edit it directly.
57
58To get Mermaid worth pasting, be explicit in your prompt. Something like: "Output only Mermaid code in a single code block. Use flowchart TD. No explanation before or after. Keep node labels under six words and avoid parentheses, colons and quotation marks inside labels." The last constraint matters more than it looks — unescaped punctuation inside a label is the single most common reason a model's Mermaid fails to parse.
59
60Four mistakes show up again and again in model-generated Mermaid, and they are worth recognising on sight. First, punctuation inside node labels: a label like A[Check user (admin?)] breaks the parser, and it needs quotes around the text. Second, invented arrow syntax — real Mermaid has a fixed set of arrows per diagram type, and models occasionally reach for one that belongs to a different type. Third, mixing diagram types in one block, such as sequence-diagram arrows inside a flowchart. Fourth, a stray prose sentence left above or below the code fence. When you paste here, the renderer reports the failing line instead of showing a blank canvas, and you can fix it in place — or hand the diagram to [Chat mode](/chat-to-diagram) and describe the change in words.
61
62Once it renders, everything downstream is normal editing. The split view keeps the source on one side and the diagram on the other, so a change to either shows up immediately. Export SVG for docs and slides, PNG for chat and tickets, or copy the Mermaid back out to commit alongside your code. If you would rather skip ChatGPT entirely, the same page will generate the diagram from a plain-English description — the prompts in the examples above are exactly the kind of thing that works.
63
64A note on names: VizText is an independent tool and is not affiliated with, endorsed by, or sponsored by OpenAI. ChatGPT and GPT are trademarks of OpenAI. This page describes how to render diagram syntax produced by ChatGPT and other language models; it does not use OpenAI's branding and does not claim any connection to it.`,scenarios:[{icon:"MessageSquare",title:"ChatGPT gave you code, not a diagram",body:"The answer ends in a Mermaid code block you cannot see. Paste it here and it becomes a real diagram in one step — no install, no signup, no local toolchain."},{icon:"Bug",title:"The Mermaid does not parse",body:"Unescaped brackets in a label, an arrow from the wrong diagram type, a sentence left above the code. The renderer points at the failing line instead of going blank."},{icon:"RefreshCw",title:"One box is wrong, the rest is fine",body:"Going back to ChatGPT for a small change often rewrites the whole diagram. Edit the node here directly, or describe the change in Chat mode and keep everything else intact."},{icon:"Download",title:"It needs to end up in a doc or a slide",body:"Export SVG for crisp scaling in Notion, Confluence or Google Slides, PNG for Slack and tickets. The chat window gives you neither."},{icon:"FileCode",title:"The diagram belongs next to the code",body:"Copy the cleaned-up Mermaid back out and commit it in a README or an ADR. Plain text diffs in review; a screenshot does not."}],faq:[{q:"Can ChatGPT create diagrams?",a:"It can write the syntax for one — most often Mermaid — but the chat window does not render it, so you see code rather than a picture. It can also generate a diagram as an image, but that c
64omes out as a flat raster with unreliable text and no way to edit it. The practical route is to have it write Mermaid and render that somewhere it can be drawn and edited."},{q:"Does ChatGPT render Mermaid?",a:"No. Mermaid code in a ChatGPT answer stays as text in a code block. Rendering needs a Mermaid engine, which is what this ChatGPT Mermaid fixer provides — paste the block and the diagram appears, broken syntax and all, with the failing line named."},{q:"Is this made by OpenAI?",a:"No. VizText is an independent tool, not affiliated with, endorsed by, or sponsored by OpenAI. ChatGPT and GPT are trademarks of OpenAI. This page exists because ChatGPT users need somewhere to render the Mermaid it writes."},{q:"What prompt makes ChatGPT output clean Mermaid?",a:"Ask for code only, name the diagram type, and constrain the labels: 'Output only Mermaid code in a single code block, use flowchart TD, no explanation, keep node labels under six words, and avoid parentheses, colons and quotation marks inside labels.' The label constraint prevents the most common parse failure."},{q:"Why does ChatGPT's Mermaid have syntax errors?",a:"Four causes cover most of it: punctuation inside node labels that was not quoted, an arrow style borrowed from a different diagram type, two diagram types mixed in one block, and prose left outside the code fence. Paste it here and the error message names the failing line so you can fix that one thing rather than regenerate everything."},{q:"Does it work with output from other models?",a:"Yes. Anything that emits Mermaid works the same way — Claude, Gemini, Copilot, a local model, or Mermaid you wrote by hand. Nothing on this page is specific to one provider."},{q:"Can I edit the diagram after it renders?",a:"Yes. The split view shows the Mermaid source next to the rendered diagram, and edits on either side update the other. You can also switch to Chat mode and describe the change in plain English instead of editing the syntax."},{q:"Is it free?",a:"Yes. Rendering and editing pasted Mermaid is free with no signup. Generating a diagram from a description uses the same free tier as the rest of the site, with a per-IP daily limit. Export SVG or PNG from the preview status bar."}]}},zh:{"flowchart-from-text":{keyword:"AI 流程图生成器",metaTitle:"AI 流程图生成器 —— 一句话生成流程图 · VizText",metaDescription:"把一段文字变成流程图。写清楚步骤和判断分支 —— 用户注册、下单结账、上线部署 —— 几秒出图,能接着改,可导出 SVG 和 PNG。",tagline:"写一段流程,拿一张流程图,导出 SVG 或 PNG。",examples:[{title:"用户注册(带邮箱验证)",prompt:"用户注册流程:输入邮箱和密码,发送验证邮件,用户点击验证链接,标记账户激活,跳转到 dashboard。"},{title:"下单结账(支付失败重试)",prompt:"电商结账流程:确认购物车,填写地址,选择支付方式,扣款,失败最多重试 3 次否则报错,成功显示订单确认页。"},{title:"CI/CD 上线流水线",prompt:"CI/CD 流水线:开发者推送到 main,跑单测,通过则构建 docker 镜像,推送到镜像仓库,部署到 staging,跑冒烟测试,通过则灰度到生产。"},{title:"找回密码",prompt:"密码重置流程:用户填邮箱,后端生成一次性 token 并发送重置邮件,用户点击链接,输入新密码两次,后端校验强度和一致性,更新密码并跳转登录。"}],useCase:`流程图用来讲清楚一件事怎么一步步走完,中间在哪里分叉。用户注册、下单结账、找回密码这类用户流程,CI/CD、订单从下单到发货、后台定时任务这类后端流程,还有出故障时照着做的值班手册,都适合画成流程图。
65
66Mermaid 流程图是纯文本,这一点比在 Figma 或 draw.io 里画有用得多:它能跟代码放在同一个仓库里,GitHub 的 README 和 Notion 里直接就渲染出来,改流程只要改一行字,不用重新拖框。图不会因为没人愿意重新拖一遍而慢慢过期。
67
68两种情况不要用流程图。一是多个角色之间来回调用、谁先谁后才是重点,那该画[时序图](/zh/sequence-diagram-from-text)。二是你关心的是一个对象能处于哪些状态、哪些跳转是允许的,那该画[状态图](/zh/state-diagram-from-text)。另外节点超过三十个就该拆成两张 —— 再多,读的人就跟不下去了。`,scenarios:[{icon:"Workflow",title:"流ç¨
68‹å’Œæµæ°´çº¿",body:"新人入职、上线部署、订单从下单到发货。主流程之外的分支、失败、重试回路都要画出来的时候用它。"},{icon:"GitBranch",title:"判断分支多的逻辑",body:"需求文档里出现好几层「如果……否则……」的时候,画成图比写成字快。产品经理能看懂,开发就能照着实现。"},{icon:"Bug",title:"排查问题和故障复盘",body:"把出问题时代码实际走的那条路径画出来。给值班的同事看一张图,比甩一堆日志有用。"},{icon:"BookOpen",title:"值班手册和新人文档",body:"「X 出问题的时候做 Y」这种口口相传的经验,画成图放进 README,新人自己就能看,不用拉一次会讲四十五分钟。"},{icon:"Repeat",title:"算法草图",body:"退避重试、令牌桶限流、状态跳转 —— 这类逻辑画成图,比在代码注释里写伪代码更容易评审。"}],faq:[{q:"AI 流程图生成器怎么用?",a:"写一句话描述流程,比如「带邮箱验证的用户注册」,直接出一张 Mermaid 流程图。哪些是步骤、哪里是判断、分支上标什么条件,都从你的措辞里推出来。生成的是合法的 Mermaid 源码,浏览器实时渲染。不用学语法,也不用打开画图工具。"},{q:"什么样的流程适合画成流程图?",a:"有先后顺序、中间要做判断的都行。常见的是用户流程(注册、结账、找回密码、登录鉴权)、CI/CD(构建、测试、部署、回滚)、故障处理手册、订单从下单到发货、后台任务编排,还有算法草图(退避重试、限流、状态跳转)。你要是能用「先怎样,然后要么这样要么那样,再回到某一步」把它说清楚,就适合画。"},{q:"生成之后能改吗?",a:"能。切到分屏,Mermaid 源码就在预览旁边,改一个字预览立刻跟着变。加节点、改分支上的条件、把方向从上下改成左右、把某个节点换成圆角或圆柱形,都是改文字。也可以在原来的描述上补一句话重新生成。"},{q:"怎么放进文档或者 PPT?",a:"预览区状态栏上有导出按钮。SVG 是矢量,放多大都不糊,适合设计文档和要打印的东西;PNG 适合 PPT、Notion 和聊天工具。目标那边支持 SVG 就优先用 SVG —— 缩放清楚,文字还能选中和搜索。"},{q:"免费吗?有次数限制吗?",a:"免费,不用注册,导出的图上没有水印。按 IP 设了每天的生成次数上限,防止被脚本刷掉接口成本,正常画图碰不到。真触发了,界面会告诉你还有多久重置。计数在所有节点上一致,换设备绕不过去。"},{q:"支持中文吗?",a:"支持。界面语言会一路传到给模型的指令里,所以用中文写,出来的图上标签也是中文,不会画着画着切回英文。中英文混着写也行,它会挑主要的那种语言统一标签;想指定的话,在描述末尾加一句「用中文」。"}]},"sequence-diagram-from-text":{keyword:"AI 时序图生成器",metaTitle:"AI 时序图生成器 —— 一句话生成时序图 · VizText",metaDescription:"描述一次接口调用、一次登录握手,或者几个服务之间的消息往来,生成带参与者和箭头的 Mermaid 时序图,可以直接放进文档。",tagline:"写清楚谁调谁,拿一张带参与者和箭头的时序图。",examples:[{title:"OAuth 2.0 授权码模式",prompt:"OAuth 2.0 授权码流:用户在客户端应用点击登录,重定向到授权服务器,登录并同意授权,授权服务器通过重定向返回 code 给客户端,客户端用 code + client_secret 换取 access_token,再用 token 调用资源服务器 API。"},{title:"Stripe 支付与回调",prompt:"Stripe 结账流程:前端通过后端创建 payment intent,后端调 Stripe API,Stripe 返回 client_secret,前端在 Stripe 侧确认支付,Stripe 通过 webhook 通知后端支付成功,后端履约订单并通过 WebSocket 推送给前端。"},{title:"Saga 分布式事务",prompt:"Saga 模式:订单服务创建订单(pending),发布事件,支付服务扣款并发布结果事件,成功则库存服务锁库存,失败则支付服务补偿退款。订单服务监听所有事件最终确定状态。"},{title:"WebSocket 消息投递",prompt:"WebSocket 聊天消息:客户端 A 通过 WebSocket 发消息到服务器,服务器持久化到数据库,通过 B 的 WebSocket 推送给接收方 B,B 发送已读回执,服务器更新消息状态并通知 A。"}],useCase:`要说清楚几方之间谁先调谁、传了什么、返回了什么,时序图æ
68˜¯æœ€åˆé€‚的。接口联调、登录鉴权握手(OAuth、SAML、JWT 刷新)、服务之间的消息往来、带锁的数据库事务、WebSocket 和 SSE 推送,都属于这一类。
69
70它在工程文档里用得多,是因为它逼着你把每个参与者点名。你没法含糊地写「后端处理一下」—— 每根箭头都得写清楚从谁到谁、传的是什么。方案评审的时候这一点很有用:评审的人可以一根箭头一根箭头地挑。
71
72一个判断标准:你口头解释的时候「然后……然后……然后……」说了三次以上,要画的就是时序图,不是[流程图](/zh/flowchart-from-text)。时序图能表达异步消息、参与者的忙碌区间,还能在单根箭头上加注释说明原因。它不擅长的是完全并行、没有明确先后的关系,那种画组件图更合适。`,scenarios:[{icon:"FileText",title:"接口文档和联调对齐",body:"REST 或 GraphQL 接口互相调用的时候 —— 鉴权、限流、重试、回调 —— 时序图把每次调用的来龙去脉写死:谁调的、什么顺序、返回什么。"},{icon:"Lock",title:"登录和鉴权握手",body:"OAuth 2.0、SAML、JWT 刷新、WebAuthn,凡是多方交换令牌的协议。时序图逼着你给每个角色和每条消息命名,安全评审的时候要用。"},{icon:"Network",title:"服务之间的消息往来",body:"微服务编排、事件驱动、消息队列(Kafka、RabbitMQ)、WebSocket 和 SSE 推送。没有一个中心调度的时候,时序图能说清楚谁发的、谁收的。"},{icon:"Database",title:"数据库事务和加锁",body:"多步骤事务、乐观锁、两阶段提交。BEGIN、SELECT FOR UPDATE、INSERT、COMMIT 的先后关系,以及锁超时之后会发生什么,画出来最清楚。"},{icon:"Zap",title:"事件驱动的系统",body:"一个领域事件扇出给多个订阅方、saga 协调长事务、CQRS 里一条命令触发一串事件。一张时序图往往比翻链路追踪更快讲明白。"}]},"erd-from-text":{keyword:"AI ER 图生成器",metaTitle:"AI ER 图生成器 —— 一句话生成 ERD · VizText",metaDescription:"用大白话描述表和字段 —— 用户、文章、评论 —— 生成带主键、外键和一对多关系的 Mermaid ER 图,写 migration 之前先把结构对齐。",tagline:"描述表和它们之间的关系,拿一张带主键外键的 ER 图。",examples:[{title:"博客库表:用户、文章、评论",prompt:"博客数据库结构:users(id, email, name, created_at)、posts(id, user_id FK, title, body, published_at)、comments(id, post_id FK, user_id FK, body, created_at)。一个用户可以写多篇文章,一篇文章可以有多条评论,一个用户可以留多条评论。"},{title:"多租户 SaaS 表结构",prompt:"多租户 SaaS:organizations(id, name, plan)、users(id, org_id FK, email, role)、workspaces(id, org_id FK, name)、documents(id, workspace_id FK, author_id FK, title, content)。每个组织有多个用户和 workspace,每个 workspace 有多篇文档,用户可以写多篇文档。"},{title:"电商:商品、订单、订单项",prompt:"电商结构:customers(id, email)、products(id, sku, name, price)、orders(id, customer_id FK, total, status, placed_at)、order_items(id, order_id FK, product_id FK, quantity, unit_price)。一个客户下多个订单,每个订单包含多个订单项,每个订单项指向一件商品。"},{title:"埋点分析表结构",prompt:"产品分析结构:users(id, anonymous_id, identified_at)、events(id, user_id FK, name, timestamp, properties json)、sessions(id, user_id FK, started_at, ended_at, device)、page_views(id, session_id FK, url, referrer, duration_ms)。"}],useCase:`ER 图用来讲清楚数据存成什么样,而不用直接甩一段建表语句给对方看。它把每张表画成一个框,列出字段和类型,标出主键外键,最关键的是把表之间是一对一、一对多还是多对多标清楚。
73
74三个时候用得上:写第一个 migration 之前先把结构画出来给大家评审;新人接手已有项目的时候;技术方案里要解释数据模型为什么长这样的时候。要拆表或者合表的时候也好用 —— 可以直接在图上标出哪些字段搬到哪。如果你要讲的是对象模型而不是数据库表,那更该画[类图](/zh/class-diagram-from-text)。
75
76Mermaid 的 erDiagram 用的是鸦爪符号,支持字段类型、主键外键标记和关系上的说明文字,画设计文档够用了。它不画索引、不画键之外的约束,也不管物理存储 —— 这些要看 dbdiagram.io 或者 ORM 自带的可视化。但大部分时候你只是想说清楚「数据长什么样」,一张跟 migration 放在一起的纯文本 ER 图正好。`,scenarios:[{icon:"Database",title:"设计新表结构",body:"写第一个 migration 之前,先把表、字段、关系画出来。字段怎么命名、是一对多还是多对多,对着一张图讨论,比散在五个群里各说各的强。"},{icon:"GitCompare",title:"拆表和重构",body:"要把 users 一张表拆成 users、profiles、preferences?在图上标出哪些字段搬到哪。前后两张图一对比,评审的人一眼就能看出哪个外键断了。"},{icon:"BookOpen",title:"新人上手和架构文档",body:"新人第一个问题往往是「钱记在哪张表里」。README 里紧挨着 migration 放一张 ER 图,比让他翻四十个 model 文件快。"},{icon:"ShieldCheck",title:"审计和合规评审",body:"等保、SOC2、GDPR 评审都会问个人信息存在哪、怎么流转。在 ER 图上把这些字段标出来,比给一张字段清单表格清楚。"},{icon:"Layers",title:"范式和性能的取舍",body:"为了读得快要不要反范式?要不要加一张预先 join 好的表?把三范式版本和反范式版本并排放,讨论起来快得多。"}],faq:[{q:"AI ER 图生成器怎么用?",a:"用大白话描述有哪些表、表之间什么关系,比如「用户发文章,文章下面挂评论,评论也属于用户」,直接生成一张 Mermaid ER 图,带实体、主键、外键,以及一对一 / 一对多 / 多对多关系。不用学 ER 图语法,也不用打开建模工具。"},{q:"字段是怎么补出来的?",a:"从上下文推。你说「用户有邮箱和密码」,这两个就成为字段;你说「文章有很多评论」,评论表上就多一个 post_id å
76¤–键。主键默认给 id;描述里提到审计或者时间的,会自动补 created_at 和 updated_at。字段类型按名字猜 —— email 给 varchar,price 给 decimal,is_active 给 boolean。"},{q:"多对多和中间表怎么画?",a:"照常说就行:「用户可以收藏文章」「一个标签打在多篇文章上,一篇文章有多个标签」。它会自己加一张中间表,带联合主键和两边的外键。也可以直接指定:「加一张 favorites 表,字段是 user_id 和 post_id」,它就按你说的形状画。"},{q:"怎么放进 migration 文档或者 PR 里?",a:"预览区状态栏可以导出 SVG 或 PNG。SVG 适合文档、README、Confluence,缩放清楚而且文字能搜;PNG 适合聊天工具、Notion 和邮件。也可以直接复制底层的 Mermaid 源码,GitHub markdown、Notion、Obsidian 都能渲染,以后要改还是改文字。"},{q:"继承、多态这类模式怎么表达?",a:"Mermaid 的 ER 图没有继承箭头,所以它用实际的建表模式来表达:单表继承画成一张表加一个 type 字段;类表继承画成父表加若干子表,子表反向指回父表;多态关联画成两个可空外键加一个 type 字段。要严格的 UML 语义,用类图那个页面。"},{q:"免费吗?要注册吗?",a:"快速模式免费,不用注册,导出的图上没有水印,按 IP 有每天的次数上限。对话模式也免费,但要登录 —— 多轮对话的上下文得跟账号绑在一起。用量特别大、需要单独容量的,走联系页说一声。"}]},"state-diagram-from-text":{keyword:"AI 状态图生成器",metaTitle:"AI 状态图生成器 —— 一句话生成状态机图 · VizText",metaDescription:"描述一个状态机 —— 订单状态、灰度发布、工单流转 —— 生成带状态和跳转条件的 Mermaid 状态图,可导出 SVG 和 PNG。",tagline:"描述一个状态机,拿一张带跳转条件的状态图。",examples:[{title:"订单状态(含取消和退款)",prompt:"订单状态机:draft -> submitted -> paid -> shipped -> delivered。draft 可取消,paid 可退款,支付失败则 submitted 退回 draft。cancelled 和 refunded 是终态。"},{title:"功能灰度发布",prompt:"功能灰度发布状态机:draft -> internal_testing -> beta -> gradual_rollout -> stable。任何状态可回退到上一状态。gradual_rollout 如果指标恶化可以直接跳到 killed。killed 是终态。"},{title:"客服工单流转",prompt:"客服工单流转:new -> triaged -> assigned -> in_progress -> waiting_customer -> resolved -> closed。任何非终态可以升级到 escalated。resolved 后客户可以在 7 天内重开回 assigned。"},{title:"OAuth token 的生命周期",prompt:"OAuth access_token 生命周期:issued(有效)。issued -> expired(TTL 到期)。issued -> revoked(用户登出或管理员撤销)。expired 若 refresh_token 有效可刷新回 issued。revoked 是终态。"}],useCase:`当你关心的不是「先做什么再做什么」,而是「这个东西现在处于什么状态,从这个状态还能合法地跳到哪」,就该画状态图。适用的对象是那些会经过一串有名字的状态、并且哪个状态能接哪个状态有明确规则的东西 —— 订单、文档、账号、灰度开关、订阅。
77
78有一个很明显的信号:团队开始争论「用户能不能同时处于已冻结和待验证」。这问的是状态合不合法,不是流程顺序。状态图逼着你把每个状态列一遍、每条跳转显式画出来 —— 画的过程里就会发现那些原本会以线上 bug 形式出现的矛盾。
79
80Mermaid 的 stateDiagram-v2 支持复合状态、并发区域、进入和退出时的动作,还有标准的 \`[*]\` 起止标记。订单和订阅的流转、文档的审批状态、设备的工作模式、灰度的各个阶段,以及需要向审计证明边界清楚的生命周期,都适合。它不擅长的是几个有状态的对象之间怎么互相影响 —— 那种再配一张[时序图](/zh/sequence-diagram-from-text)。`,scenarios:[{icon:"ToggleRight",title:"表单和向导的状态",body:"多步向导、结账漏斗、新手引导。草稿、待审、已通过、已驳回各自对应不同的界面和权限时,状态图就是这套规则的唯一出处。"},{icon:"Cog",title:"审批和工作流",body:"代码评审状态、订单状态、工单状态。凡是会经过若干个有名字的阶段、并且规定了谁能触发哪次跳转的对象,都值得画一张。"},{icon:"RefreshCw",title:"重试和恢复",body:"任务从等待到运行,再到成功、失败、取消、重试中。重试逻辑一复杂(退避、死信队列),看状态图比看重试代码好理解。"},{icon:"CircleDot",title:"前端组件状态",body:"加载中、空状态、出错、成功 —— 每个页面都得处理这四种。状态图把设计规范里的约定摆到明面上:这个组件管哪几种状态、怎么转。"}
80,{icon:"FileCode",title:"协议和设备规范",body:"TCP 握手、WebSocket 连接的生命周期、硬件的工作模式。协议规范一直用状态图写,因为它精确到可以照着实现。"}]},"class-diagram-from-text":{keyword:"AI UML 类图生成器",metaTitle:"AI UML 类图生成器 —— 一句话生成类图 · VizText",metaDescription:"描述类的属性、方法和继承关系,生成 Mermaid UML 类图,用在设计文档、技术方案和代码评审里。",tagline:"描述类、属性和继承关系,拿一张 UML 类图。",examples:[{title:"几何图形(抽象基类)",prompt:"UML 类图:抽象类 Shape 含 area() 方法,子类 Circle(radius: double)、Rectangle(width, height)、Triangle(base, height),各自 override area()。"},{title:"员工层级(带角色)",prompt:"员工类层级:Person(name, email, phone)。Employee 继承 Person(employeeId, salary, hireDate)。Manager 继承 Employee(directReports 列表)。Contractor 继承 Person(contractEnd, hourlyRate)。显示可见性标记和 getter。"},{title:"电商领域模型",prompt:"电商领域模型:Customer 有多个 Order。Order 有多个 LineItem。LineItem 引用 Product 含 unitPrice 和 quantity。Product 有 category、sku、price。显示关联的基数和关键方法。"},{title:"支付处理(策略模式)",prompt:"支付处理采用策略模式:PaymentProcessor 使用 PaymentStrategy 接口。具体策略:StripeStrategy、PayPalStrategy、CryptoStrategy。每个实现 charge(amount) 和 refund(txId)。显示接口实现和组合关系。"}],useCase:"类图讲的是代码的结构:有哪些类型、每个类型有什么字段和方法、类型之间靠继承、组合还是关联连起来。\n\n三个常用场合:新人文档里说明领域模型怎么组织;技术方案里提一套新的类层次或者一次重构;面试白板上快速把设计画出来。它也是写设计模式最省事的方式 —— 工厂、策略、观察者、访问者各有一套固定画法,看的人一眼就认出来。要讲的是数据库表而不是对象模型,那该画 [ER 图](/zh/erd-from-text)。\n\nMermaid 的 classDiagram 支持常用的 UML 记号:可见性(`+` 公开、`-` 私有、`#` 受保护、`~` 包内)、抽象类和抽象方法、`<<interface>>` 标注、泛型,以及各种关系箭头(继承 `<|--`、组合 `*--`、聚合 `o--`、关联 `--`、依赖 `..>`)。它不是完整 UML —— 没有泳道,也没有完整的活动图语义 —— 但写工程文档的时候这反而是好事,能逼着你写简单点。真要完整 UML,那多半是拿错工具了。",scenarios:[{icon:"Box",title:"领域模型",body:"User、Order、Payment、Invoice —— 业务里的那些名词。字段、方法、彼此的关系都在类图上,新人看一眼就知道这个系统在管什么。"},{icon:"Layers",title:"DDD 的聚合和限界上下文",body:"领域驱动设计的产出本来就是类图。聚合根、实体、值对象,以及它们之间确切的关系 —— 类图本身就是规范。"},{icon:"Library",title:"库和 SDK 的接口设计",body:"发 1.0 之前先把公开出去的 API 画成类图。别人查文档会先看这张图,搞清楚你暴露了什么,比只写注释清楚。"},{icon:"GitPullRequest",title:"重构方案",body:"抽这个方法、挪那个字段、把三个类合成一个。前后两张类图一摆,评审的人一眼看到哪里是破坏性改动。"},{icon:"BookOpen",title:"写设计模式",body:"工厂、策略、观察者、访问者,每个经典模式都有固定的类图形状。方案里放一张,看的人不用读完就知道你在用哪个。"}]},"mindmap-from-text":{keyword:"AI 思维导图生成器",metaTitle:"AI 思维导图生成器 —— 一句话生成思维导图 · VizText",metaDescription:"给一个题目,生成能折叠展开的思维导图。做规划、列提纲、整理读书笔记都能用,可以导出 OPML 丢进 XMind。",tagline:"给一个题目,拿一张能折叠展开的思维导图。",examples:[{title:"产品发布前的准备清单",prompt:"产品发布思维导图:市场(SEO、广告、社媒、PR、邮件),工程(后端、前端、移动端、基础设施),运营(客服、账单、法务、合规),分析(dashboard、漏斗、群组追踪)。每条分支下加 2-3 个叶子节点。"},{title:"软件架构要考虑哪些事",prompt:"新 SaaS 的软件架构思维导图:可靠性(SLO、监控、事故响应),可扩展性(缓存、分片、队列),安全(认证、密钥、审计),成本(计算、出口、存储),开发体验(文档、开发环境、CI 速度)。"},{title:"高级工程师面试准备",prompt:"资深软件工程师面试准备思维导图:系统设计(数据库、缓存、队列、分片、CDN、负载均衡),算法(数组、树、图、DP、贪心),行为面试(领导力、冲突处理、成长),领域知识(目标公司做什么就学什么)。"},{title:"周末项目点子",prompt:"周末项目思维导图:学习(写编译器、写数据库、写 shell),工具(工作流自动化、开发效率),游戏(国际象棋 AI、roguelike、塔防),数据(个人分析、习惯追踪、dashboard)。每条估算需要多少个周末。"}],useCase:`思维导图用在想法还没成形的阶段:题目很大,你还不知道哪些是一级、哪些是二级,连提纲都列不出来。
81
82它的长处是把并列关系和从属关系分开。同样一堆内容,写成一串符号列表看不出层次,画成树就能看出来。但它不管顺序,也不管规则 —— 那是[流程图](/zh/flowchart-from-text)和[状态图](/zh/state-diagram-from-text)的事。所以它适合的场合是「想法的形状」本身就是要传达的东西:头脑风暴、给新人划定一个学习范围、写文档之前先搭结构。
83
84Mermaid 的 mindmap 用缩进表示层级,节点可以是方框、圆角、六边形、圆形,用来做视觉区分。跟 XMind、MindMeister 这类专业工具比,它故意做得很简单 —— 没有图标、不能富文本、不能拖着重排。换来的是纯文本,可以跟代码一起进版本库。`,scenarios:[{icon:"Lightbulb",title:"头脑风暴",body:"立项会、想功能、开新方向。发散阶段用思维导图比用列表好 —— 已经想到的是什么形状、哪一块还是空的,看得见。"},{icon:"Rocket",title:"功能规划和发布准备",body:"把一件大事拆成几摊活。研发、市场、运营、数据各占一支,每片叶子是一件å
84…·ä½“要交付的东西,漏了哪块一眼能看出来。"},{icon:"Search",title:"调研和竞品分析",body:"看一个新方向?每个竞品一个节点,定价、功能、集成、目标用户各占一支。探索阶段比拉表格快。"},{icon:"MessagesSquare",title:"会议记录和复盘",body:"边讨论边往图上记,话题跳来跳去也不会丢上下文。会后再看,思维导图比一条一条的流水记录好扫。"},{icon:"Sparkles",title:"产品定位和策略",body:"一页纸说清楚我们是做什么的。思维导图逼着你把支柱、原则、不做什么写具体,比几段话好读。"}],faq:[{q:"AI 思维导图生成器怎么用?",a:"给一个题目 —— 想学的一个领域、要规划的一个项目、要梳理的一本书 —— 直接生成一张有中心主题、三到五条主干、每条主干下面两三层的导图。生成的是缩进式的 markdown 大纲,浏览器渲染成可交互的画布,能折叠、能拖、能缩放。"},{q:"什么题目适合画思维导图?",a:"有天然层级的都适合。常见的是学习笔记(一段历史、一门学科、一本书的目录)、项目规划(发布准备、婚礼清单、一学期的安排)、头脑风暴(功能点、卖点、决策的正反面)、内容提纲(文章、演讲、视频脚本)。只要你能想象成「中心一个题目,四周散开若干支」,就能画。"},{q:"画出来能交互吗?",a:"能。点节点折叠或展开这一支,空白处拖着平移,滚轮或者双指缩放,手机上点一下折叠。编辑重绘的时候会保留当前视角,不会跳回去。这是 markmap 比静态 SVG 强的地方 —— 两百多个节点也还能看。"},{q:"怎么导到 XMind 或者 Obsidian?",a:"四种格式:SVG(矢量,贴文档)、PNG(位图,è´´ PPT 和聊天工具)、Markdown(缩进式源码,Obsidian 里直接接着编)、OPML(大纲通用格式,XMind、MindNode 和大部分大纲工具能直接读)。OPML 保留完整的层级和文字,SVG 保留画出来的样子,看你要往哪é€
84ã€‚"},{q:"生成之后能改吗?",a:"能。分屏之后 markdown 源码就在画布旁边,改一个字画布立刻跟着变。加一支就多打一个 ##,想往下挪一级就多加一个 #,搬子树就剪切粘贴。也可以在原来的题目后面补一句「顺便讲讲预算」再生成一次,它会按新范围重画。"},{q:"免费吗?有次数限制吗?",a:"免费,不用注册,导出的图上没有水印。按 IP 有每天的次数上限,正常做笔记和列提纲够用,防的是脚本刷接口。真触发了,界面会告诉你还有多久重置。计数在所有节点上一致。"}]},"gantt-from-text":{keyword:"AI 甘特图生成器",metaTitle:"AI 甘特图生成器 —— 一句话生成项目排期图 · VizText",metaDescription:"描述项目的阶段、里程碑和先后依赖,生成带日期和工期的 Mermaid 甘特图,放进方案文档或者汇报材料里。",tagline:"描述阶段和先后依赖,拿一张带工期的甘特图。",examples:[{title:"12 周 MVP 排期",prompt:"12 周 MVP 发布甘特图,从 2026-01-01 开始。阶段:调研(2 周),设计(3 周,第 2 周开始 overlap),后端(5 周,设计之后),前端(4 周,第 5 周起与后端并行),测试(2 周,所有开发之后),发布准备(1 周)。发布是一个里程碑。"},{title:"婚礼筹备时间线",prompt:"婚礼筹备甘特图,提前 6 个月。阶段:场地预订(第 1-3 周),来宾名单(第 2-4 周),请柬(第 5-8 周,名单之后),供应商预订(第 3-10 周),菜单规划(第 8-12 周,供应商之后),最后细节(第 20-24 周),婚礼当天在第 25 周。"},{title:"一个季度的产品排期",prompt:"Q1 产品路线图甘特图,从 2026-01-01 开始:功能 A(设计 2 周 + 开发 4 周 + 发布 1 周),功能 B(设计 1 周 
84+ 开发 3 周,第 5 周开始),功能 C(只开发 2 周,第 8 周开始),缺陷修复冲刺(季度最后 2 周)。"},{title:"火箭发射倒计时",prompt:"火箭发射倒计时甘特图:L-30 天加注准备,L-14 天最终集成测试,L-7 天天气评估窗口打开,L-3 天发射演练,L-1 天暂停评估,L-0 发射日(6 小时:飞前检查、加注、终端倒计、点火、上升)。点火是一个里程碑。"}],useCase:`甘特图回答三个问题:有哪几个阶段、它们在时间上怎么重叠、谁卡着谁。写研发排期文档(「MVP 十二周的计划长这样」)、给领导汇报「什么时候能好」、做提案时证明顺序已经想清楚了,都用它。阶段本身还没定下来的时候,先画一张[思维导图](/zh/mindmap-from-text)把范围理清楚,定型了再排成时间轴。
85
86它有个明确的短板:撑不住动态更新。放在文档里的一张甘特图,现实一偏离计划就过期了。真拿甘特图管项目的团队用的是能跟任务状态自动同步的工具。这里画的甘特图是「最初的那份计划」—— 立项时的一个快照,不是日常追踪的工具。
87
88Mermaid 的 gantt 支持日期格式、分组、工期、依赖(\`after 任务id\`)和里程碑。跟专业项目管理工具比它故意做得简单 —— 不分配人力,不高亮关键路径,不能拖着改日期。换来的是纯文本,可以跟代码一起进版本库。`,scenarios:[{icon:"Calendar",title:"排期和立项",body:"六周的项目、四条并行的活、三个里程碑。立项会上一张甘特图,让「什么时候能完成」不只是项目经理心里有数。适合当作零点的计划快照。"},{icon:"Rocket",title:"迭代和发布安排",body:"市场周二要上落地页,研发周四交功能,内容周五发文章。甘特图在群里吵到第四十七条之前,就把依赖关系摆出来了。"},{icon:"GitBranch",title:"依赖梳理",body:"A 卡着 B,B 卡着 C。依赖超过三个,写成文字就开始绕。画成图,关键路径一眼能看到。"},{icon:"Map",title:"路线图沟通",body:"季度层面的「下个季度要发什么」。甘特图是领导看得懂的形式 —— 汇报、全员会、解释为什么定这个目标,都能用。"},{icon:"ShieldCheck",title:"合同和 SLA",body:"按里程碑付款的客户合同、有交付日期的供应商协议。「我们承诺 X 日交付 Y」以甘特图为准,每次进度评审都对着它看。"}]},"chat-to-diagram":{keyword:"对话生成图表",metaTitle:"对话生成图表 —— AI 先问清楚再画(登录后免费)",metaDescription:"登录后可以跟 AI 对话生成流程图、时序图、ER 图和思维导图。画之前它会先问两三个问题,流程一复杂,比一句话直接出图准得多。",tagline:"跟 AI 对话把图画出来 —— 不用学语法,也不用它瞎猜。",examples:[{title:"带两步验证的登录流程",prompt:"画一个登录流程。用户先输邮箱、再输密码、再输 2FA 验证码。如果 2FA 失败,跳到重置页面。"},{title:"下单到通知的时序",prompt:"时序图:客户下单、网关转发到订单服务、订单服务写入数据库并异步调用通知服务。"},{title:"产品发布思维导图",prompt:"SaaS 产品发布思维导图:工程、市场、销售、支持 —— 每一支下面挂 3-4 个子任务。"},{title:"注册流程(含异常分支)",prompt:"画用户注册流程。包括邮箱验证、忘记密码走重置、连续 5 次登录失败账号锁定。"}],useCase:`一句话直接出图的问题是 AI 得猜你的意思。对话模式不猜:它先问两三个问题 —— 有哪些角色、都发生什么、这些调用是等结果还是发出去就不管 —— 问明白了再画。
89
90画完它会用一张确认卡把自己补的东西列出来。如果它加了你没说的返回箭头、你没提的角色、你没打算画的分支,点一下删掉,图立刻重画一版去掉它。
91
92流程越复杂越值得用对话模式:带异常分支的登录、跨好几个服务的[时序图](/zh/sequence-diagram-from-text)、状态多的生命周期。你想让 AI 帮着一起想清楚要画什么,而不只是照着执行,就用它。
93
94其他都跟快速模式一样:七种图都能画,一样免费,一样能导出 SVG、PNG、Markdown 和 OPML。两种模式也能混着用 —— 先用快速模式出个初稿,再切到对话模式接着改。`,scenarios:[{icon:"Lightbulb",title:"不知道怎么描述",body:"它问的那几个问题,会帮你把角色、步骤、异常分支想一遍,顺便发现漏了什么。比对着空输入框发呆强。"}
94,{icon:"GitBranch",title:"流程复杂、分支多",body:"分几轮一点点补,它记得住哪些你已经确认过、哪些还没定,最后一次性把整张图画出来。"},{icon:"MessageSquare",title:"想核对 AI 的推断",body:"每次出图都带一张确认卡,把它自己补的内容列清楚。哪条不对点掉,几秒钟重画 —— 不用把描述重写一遍。"},{icon:"RefreshCw",title:"设计评审边聊边改",body:"评审的时候先说个大概,别人指出问题就接着补。多轮之间上下文一直在。"},{icon:"Book",title:"带新人",body:"让新人自己跟 AI 聊着把系统的时序图推出来,比读一份现成文档记得牢。"}],faq:[{q:"对话模式跟快速模式差在哪?",a:"快速模式一句话进、一张图出。对话模式先问两三个问题再画。流程本来就在你脑子里,用快速模式;想让 AI 帮着把角色、步骤、异常分支想清楚,用对话模式。"},{q:"画之前会问几个问题?",a:"一般两三个,复杂的到四五个。提问次数有预算,不会没完没了地追问。任何时候说一句「直接画」,它就用手头已有的信息出图。"},{q:"它加了我没说的东西怎么办?",a:"画完会弹一张确认卡,把它推断出来的东西列清楚 —— 你没提的一条返回箭头、你没说的一个角色。点「删掉」就重画一版去掉;点「保留」它就进入这张图的定义,后面接着改也一直在。"},{q:"对话模式支持哪些图?",a:"七种全都支持:流程图、时序图、ER 图、类图、状态图、思维导图、甘特图。时序图问得最细(角色、事件、是否同步都是结构化的槽位),其他类型问得轻一些,但多轮细化同样有用。"},{q:"对话模式免费吗?",a:"免费。登录之后每天有一个比较宽的次数上限,24 小时重置。不想登录的话,快速模式直接就能用。两种模式共用同一份免费额度。"}]},"architecture-diagram-from-text":{keyword:"AI 架构图生成器",metaTitle:"AI 架构图生成器 —— 一句话生成系统架构图 · VizText",metaDescription:"描述系统里有哪些服务、数据库、网关和队列,以及它们怎么连,生成可编辑的 Mermaid 架构图。免费,能导出 SVG 和 PNG。",tagline:"描述系统里有哪些组件、彼此怎么连,拿一张分层的架构图。",examples:[{title:"AWS 三层 Web 应用",prompt:"画一个部署在 AWS 上的 Web 应用架构图:CloudFront CDN 在最前面,转发到 Application Load Balancer,再路由到跑在 ECS Fargate 上的 API 服务,API 读写 RDS Postgres 数据库,热点数据缓存在 ElastiCache Redis。静态资源从 S3 提供。"},{title:"微服务 + 事件总线",prompt:"微服务架构图:API 网关前置,后面是订单服务、支付服务、库存服务。订单服务把事件发布到 Kafka,由库存服务和通知服务消费。每个服务各自拥有独立的 Postgres 数据库。"},{title:"Serverless 数据管道",prompt:"无服务器数据管道架构:上传到 S3 触发一个 Lambda 校验文件并把原始数据写入 S3 数据湖,同时向 EventBridge 发一个事件。第二个 Lambda 消费该事件、转换数据、加载进 Redshift 数据仓库供分析使用。"},{title:"移动端后端(带鉴权)",prompt:"移动应用后端架构:iOS 和 Android 客户端都调用 API 网关,网关转发到基于 Cognito 的鉴权服务,以及基于 DynamoDB 的核心 API 服务。推送通知走 SNS。静态内容通过 CloudFront 和 S3 提供。"}],useCase:`架构图回答一个问题:这个系统由哪些部分组成,它们之间怎么连。写设计文档要先给个全貌、新人想在十秒内搞清楚一个请求从哪走到哪、给不看长文档的领导讲一套方案,都用它。
95
96跟[流程图](/zh/flowchart-from-text)的区别在于:流程图画的是一件事随时间怎么走完,架构图画的是系统静止时的样子 —— 这个服务调那个服务,这个队列夹在两个服务中间。你把组件说出来 —— 网关、服务、数据库、队列、缓存、CDN —— 它按边缘层、计算层、数据层分组排布,用不同形状区分类型,跟在白板上手画的架构草图一个路子。
97
98一个要说明白的局限:图上用的是带文字标注的通用形状,不是 AWS、GCP、Azure 的官方图标 —— Mermaid 本身不带云åŽ
98‚商图标库,所以 RDS 或者 S3 会画成标注清楚的圆柱和方框,不是品牌 logo。内部设计文档和技术方案够用了;要给客户做正式的云架构 PPT,可以拿这张图当布局初稿,再到 Lucidchart 之类的工具里换成官方图标。`,scenarios:[{icon:"LayoutTemplate",title:"设计文档和技术方案",body:"先给评审的人一张全貌,再展开细节。方案开头放一张架构图,能省掉十条「这个到底怎么调那个」的追问。"},{icon:"Cloud",title:"云上资源规划",body:"真正开始建资源之前,先把打算怎么搭画出来。评审的人在图上比在 terraform plan 里更容易发现少了一层缓存,或者多了一跳。"},{icon:"BookOpen",title:"新人上手",body:"新人第一天就会问请求在这个系统里怎么流转。README 里挂一张架构图,不用打开代码就能回答。"},{icon:"ShieldCheck",title:"安全评审和供应商审查",body:"审计和安全评审要看的是信任边界 —— 哪些对外暴露、哪些只在内网、数据在哪里跨过边界。想说清楚攻击面,一张标注清楚的架构图最快。"},{icon:"GitCompare",title:"迁移方案",body:"从单体拆成微服务,或者从自建换成托管服务?迁移前后各一张图,方案就变得具体、能评审了。"}],faq:[{q:"AI 架构图生成器怎么用?",a:"用大白话描述系统里有哪些服务、数据库、队列和网关,以及它们怎么连。它生成一张 Mermaid 图,把组件按边缘层、计算层、数据层分组并标出连接。底层没有独立的架构图渲染引擎,用的还是流程图语法,只是针对系统图定了一些约定 —— 存储画圆柱,分层用 subgraph 框起来。"},{q:"能画 AWS、GCP、Azure 的官方图标吗?",a:"不能。Mermaid 不带云厂商图标库,组件会画成标注清楚的形状 —— 数据库和存储用圆柱,服务和计算用方框,网关用圆角长条 —— 而不是品牌 logo。这样图跟厂商无关,出得也快。要官方图标做客户演示,可以拿它当布局初稿,再到 Lucidchart 或 draw.io 里换皮。"},{q:"能画多云或者混合部署吗?",a:"能。它不关心组件属于哪个云 —— 你说本地数据库跟云上接口通信,或者一套系统横跨 AWS 和 GCP,它就照你说的连。在描述里点名具体产品(S3、GCS、自建 Postgres)有助于它把节点标准确。"},{q:"画到多少个组件就看不清了?",a:"一张图超过十五到二十个组件,可读性明显下降 —— 跟流程图是同一条经验。系统大的话,一次只描述一个子域或者一层(比如「只画支付这块」),分成几张聚焦的图,别硬塞进一张。"},{q:"生成之后能改吗?",a:"能。分屏之后 Mermaid 源码和预览并排,加一个服务、改一条连线上的说明、重新分组,都是改文字。也可以在原来的描述上补一句重新生成。"},{q:"架构图生成器免费吗?",a:"免费,不用注册。按 IP 有每天的次数上限,防的是脚本刷接口,正常用碰不到,计数在所有节点上一致。预览区状态栏能导出 SVG(贴文档)和 PNG(è´´ PPT)。"}]},"uml-diagram-from-text":{keyword:"AI UML 图生成器",metaTitle:"AI UML 图生成器 —— 一句话生成 UML 图 · VizText",metaDescription:"用大白话描述类结构、一次登录握手,或者一个对象的生命周期。AI 判断该画类图、时序图还是状态图,然后画出来。",tagline:"描述你的设计,AI 判断该画类图、时序图还是状态图。",examples:[{title:"类图:图书馆系统",prompt:"画一个图书馆系统的 UML 类图:Book(isbn、title、author)、Member(id、name、email)、Loan(dueDate、returnedDate)把 Member 和 Book 关联起来。Librarian 继承 Member,多一个 canManageCatalog 布尔字段。标出关联关系和基数。"},{title:"时序图:登录握手",prompt:"画一个登录握手的 UML 时序图:客户端把凭证发给鉴权服务,鉴权服务在用户数据库里校验,成功后签发 JWT,客户端存下 token 并在后续 API 调用中携带。"},{title:"状态图:订单生命周期",prompt:"画一个订单的 UML 状态图:已创建 -> 已支付 -> 已发货 -> 已送达。从已创建可以取消。从已支付可以退款。取消和退款都是终态。"},{title:"类图:策略模式",prompt:"用策略模式画一个 UML 类图:PaymentProcessor 依赖一个 PaymentStrategy 接口。具体策略 StripeStrategy 和 PayPalStrategy 各自实现 charge(amount)。标出接口、实现类和组合关系。"}],useCase:`UML 规范一共定义了十四种图,但日常工程里真正在用的就三种:[类图](/zh/class-diagram-from-text)管结构(有哪些类型、各自有什么、怎么关联),[时序图](/zh/sequence-diagram-from-text)管随时间展开的行为(谁调谁,什么顺序),[状态图](/zh/state-diagram-from-text)管随状态展开的行为(有哪些状态,哪些跳转合法)。这个页面是 UML 的总入口:用大白话描述你的设计,AI 判断这三种里该用哪种,然后画出来。
99
100判断的标准很简单。问题是「这套类型长什么样」就画类图 —— 领域模型、DDD 聚合、库的接口。问题是「这几方的调用顺序是什么」就画时序图 —— 接口握手、分布式事务、登录鉴权。问题是「这个对象能处于哪些状态,什么让它跳转」就画状态图 —— 订单状态、审批流转、协议状态。
101
102已经确定要哪一种的话,去对应的单独页面(类图、时序图、状态图),那边讲得更细,例子更多,
102语法说明也更全。这个页面适合你确定要一张 UML 图、但还没想好是哪种的时候 —— 把设计说出来,让它替你分类。`,scenarios:[{icon:"Box",title:"面向对象的设计文档",body:"还没想好文档里该放结构还是放行为?先把设计说出来让它判断 —— 猜得不对,随时换一种重新生成。"},{icon:"Layers",title:"评审前的准备",body:"评审之前把相关的类结构、关键的调用顺序、或者对象的生命周期画出来,挑最能说明你这次改动的那一种。"},{icon:"GraduationCap",title:"学 UML 和教 UML",body:"学生和讲师用它快速看到标准记号 —— 可见性符号、几种箭头、生命线 —— 不用装专门的建模工具。"},{icon:"PenTool",title:"面试白板题",body:"像在白板上那样勾出类的层次,或者一串接口调用的顺序,画完导出来放进作业提交或者作品集。"},{icon:"BookOpen",title:"写设计模式",body:"工厂、策略、观察者这些经典模式各有一套标准画法。说清楚你用的是哪个模式,拿到的就是别人一眼认得出的图。"}],faq:[{q:"这个页面支持哪几种 UML 图?",a:"三种:类图、时序图、状态图,也就是工程团队日常真在用的那三种。用例图、活动图、组件图、部署图不生成 —— 完整 UML 规范有十四种,底层的 Mermaid 只实现了实际用得上的这个子集。"},{q:"它怎么判断该画哪种?",a:"看你描述里的措辞。出现「有一个」「继承」「实现」这类结构词,判成类图;出现「发送」「调用」「返回」这类交互词,判成时序图;出现「变成」「跳转到」这类生命周期词,判成状态图。想确保拿到指定的那种,直接去类图、时序图或状态图的单独页面 —— 那些页面不做判断,永远画那一种。"},{q:"判断错了怎么办?",a:"把话说明确一点重新生成,比如开头直接写「画一张时序图」。或者去对应类型的单独页面,那边完全不做判断。"},{q:"记号支持得全吗 —— 可见性、构造型、多重性?",a:"支持的那三种里是全的:类图有可见性符号(+ - # ~)、<<interface>> 构造型、泛型和全部标准关系箭头;时序图有激活条、异步消息和注释;状态图有复合状态和 [*] 起止标记。"},{q:"生成之后能改吗?",a:"能。每张图都会打开分屏,Mermaid 源码在旁边实时渲染 —— 直接改文字,或者在原描述上补一句重新生成。"},{q:"免费吗?",a:"免费,不用注册,按 IP 有每天的次数上限。预览区状态栏能导出 SVG 和 PNG。"}]},"ai-diagram-from-text":{keyword:"AI 文本生成图表",metaTitle:"AI 文本生成图表 —— 一句话出图,类型自动判断 · VizText",metaDescription:"用大白话描述任何东西。AI 判断该画流程图、时序图、ER 图、类图、状态图、思维导图还是甘特图,然后画出来。",tagline:"把想说的写出来,该用哪种图交给 AI 判断。",examples:[{title:"入职流程(判成流程图)",prompt:"新员工入职流程:HR 发 offer,候选人签字,IT 配置电脑和账号,主管安排第一周的 1:1,员工在第 5 天前完成合规培训。"},{title:"Webhook 投递(判成时序图)",prompt:"Webhook 投递流程:我们的后端把事件发给客户的 webhook 地址,如果客户的服务器返回非 200,用指数退避重试最多 5 次,之后把事件转移到死信队列。"},{title:"季度排期(判成思维导图)",prompt:"Q2 路线图思维导图:平台组(鉴权重构、账单 v2)、增长组(SEO、推荐计划)、移动端(离线模式、推送通知)、支持组(帮助中心重写、在线客服试点)。"},{title:"两周迭代(判成甘特图)",prompt:"两周冲刺甘特图:设计(第 1-2 天)、后端开发(第 2-6 天)、前端开发(第 4-8 天,和后端重叠)、QA(第 8-9 天)、发布(第 10 天)。"}],useCase:`VizText 一共支持七种图 —— 流程图、时序图、ER 图、类图、状态图、思维导图、甘特图 —— 外加一个基于流程图引擎做的架构图。这个页面是总入口:你脑子里有段描述,但还没想好该用哪种形状表达,直接写进来,让它替你判断。讲过程的判成[流程图](/zh/flowchart-from-text),讲角色之间来回的判成[时序图](/zh/sequence-diagram-from-text),一层套一层的提纲判成[思维导图](/zh/mindmap-from-text),以此类推。
103
104这件事有用,是因为大部分人不是按图表类型来想事情的。他们想的是「我要讲清楚注册流程怎么走」或者「我要把这个季度的安排摆出来」,不是「我需要一张流程图」。自动判断的意思是你只管说你真正关心的事,翻译成图表语言那一步交给工具。
105
106已经确定要哪种图的话,去对应的单独页面(流程图、时序图、ER 图、类图、状态图、思维导图、甘特图、架构图),那边例子更贴、语法说明更细。这个页面适合「先写写看会出什么」的用法。`,scenarios:[{icon:"Sparkles",title:"不想先决定类型",body:"脑子里有段描述,但没想好该画哪种。粘进来让它判断,比把七个页面读一遍再挑快。"},{icon:"BookOpen",title:"内容混杂的文档站",body:"一个团队 wiki 里流程图、时序图、思维导图都要有。一个能判断类型又能全画的工具,比七个工具切来切去顺手。"},{icon:"NotebookText",title:"笔记和知识库配图",body:"会议记录,或者想到哪写到哪的一段话,当场变成图,不用先想它该归成哪一类。"},{icon:"GraduationCap",title:"讲课和讲概念",body:"讲师口头描述一个概念,把同样这段话粘进来,拿到最贴的那种图 —— 面对非技术听众、连该用哪种图都不明显的时候尤其有用。"},{icon:"Users",title:"非研发同学用图",body:"不懂 Mermaid 语法、也叫不出图表类型名字的产品和设计,直接用大白话说想要什么,分类的事交给 AI。"}],faq:[{q:"它是怎么判断图表类型的?",a:"看描述里的线索 —— 有步骤和判断的多半是流程图,有具名角色互相发消息的多半是时序图,有实体和关系的多半是 ER 图,一层套一层的主题多半是思维导图,带日期的阶段多半是甘特图 —— 生成之前先选出最贴的那种。"},{q:"能不能不让它自动选,自己指定类型?",a:"能。去某个单独的类型页面(流程图、时序图、ER 图、类图、状态图、思维导图、甘特图或架构图),那些页面锁死类型,不做判断;或者在首页的类型选择器里先选好再写描述。"},{q:"自动判断准吗?",a:"描述清楚、明确落在支持的七种里的时候很准。含糊的描述 —— 比如一个过程同时又有点层级结构 —— 可能判到任何一边。结果不对的话,先明确指定类型再重新生成。"},{q:"支持哪些图表类型?",a:"七种:流程图、时序图、ER 图、UML 类图、状态图、思维导图、甘特图,外加架构图。架构图用流ç¨
106‹å›¾å¼•擎实现,带一套分层布局的约定。"},{q:"生成之后能改吗?",a:"能。每张图都会打开分屏,源码和预览并排 —— 思维导图用的是 markmap 大纲,其他都是 Mermaid。"},{q:"免费吗?",a:"免费,不用注册,按 IP 有每天的次数上限。能导出 SVG 和 PNG,思维导图还能导出 Markdown 和 OPML。"}]},"ai-diagram-from-code":{keyword:"AI 代码生成图表",metaTitle:"AI 代码生成图表 —— 粘代码出类图和流程图 · VizText",metaDescription:"粘一段代码,拿一张类图、流程图或者架构图。不用装解析器,不用把整个仓库拉下来 —— 粘进来就能画。",tagline:"粘一段代码,拿一张类图、流程图或者架构图。",examples:[{title:"TypeScript 类层次 → 类图",prompt:"从这段代码画一个 UML 类图:abstract class Shape { abstract area(): number } class Circle extends Shape { constructor(private radius: number) { super() } area() { return Math.PI * this.radius ** 2 } } class Rectangle extends Shape { constructor(private w: number, private h: number) { super() } area() { return this.w * this.h } }"},{title:"Express 路由 → 流程图",prompt:"画出这个 Express 路由处理函数的控制流流程图:router.post('/checkout', authenticate, validateCart, async (req, res) => { const total = calculateTotal(req.body.items); if (total <= 0) return res.status(400).send('empty cart'); const charge = await chargeCard(req.user, total); if (!charge.success) return res.status(402).send('payment failed'); const order = await createOrder(req.user, req.body.items); res.json(order); })"},{title:"递归函数 → 流程图",prompt:"为这个函数画一个流程图:function quicksort(arr) { if (arr.length <= 1) return arr; const pivot = arr[0]; const left = arr.slice(1).filter(x => x < pivot); const right = arr.slice(1).filter(x => x >= pivot); return [...quicksort(left), pivot, ...quicksort(right)]; }"},{title:"docker-compose → 架构图",prompt:"从这个 docker-compose.yml 画一个架构图:服务有 'web'(nginx,暴露 80 端口,依赖 'api')、'api'(node 应用,依赖 'db' 和 'redis')、'db'(postgres,挂载 volume)、'redis'(缓存)、'worker'(后台任务处理,依赖 'redis' 和 'db')。"}],useCase:`有时候讲清楚一段代码最快的办法是给张图,而拿到这张图最快的办法不是装一个静态分析工具,是把代码粘进来,说清楚你要什么图。粘一个类定义要[类图](/zh/class-diagram-from-text),粘一个路由处理函数要控制流的流程图,粘一个 docker-compose 要服务拓扑的[架构图](/zh/architecture-diagram-from-text)。
107
108说清楚要什么很重要 —— 「从这段代码画一张类图」比光把代码粘进来、不给任何指令效果好得多。因为它读代码的方式接近一个工程师扫一眼 diff,是语义上的理解,不是严格建一棵语法树。这也是跟专门的代码转 UML 工具相比要认的账:不用构建、不用装语言服务器、它认识的语言都能用(JavaScript、TypeScript、Python、Java、Go、Rust 等等),但这是尽力而为的理解,不是保证正确的静态分析。写一条评审留言或者一份上手文档,这笔账划算;要是这张图必须跟真实类型系统严丝合缝地对上,先看一遍再用。
109
110粘的时候克制一点 —— 一个类层次、一个函数、一个 docker-compose 文件,不要整个仓库。它读的是能塞进一次对话的内容,不是整个代码库。跨几十个文件的逆向工程,这是逐个片段的起点,不是全仓库可视化工具。`,scenarios:[{icon:"Archive",title:"看没人管的老代码",body:"接手一个没文档、类之间关系也说不清的文件?粘进来让它画类图,比跨着几个文件手动追继承关系快。"},{icon:"GitPullRequest",title:"评审时看控制流",body:"一段绕的控制流改动,画成流程图比看 diff 好评审。评审会之前把新函数粘成一张图,直接贴到评论里。"},{icon:"BookOpen",title:"上手陌生项目",body:"新人粘一个核心领域类,或者主请求入口,拿到一张图,不用干读五百行。"},{icon:"GitCompare",title:"重构前留个底",body:"把一个什么都干的大类拆开之前,先把现在的结构画出来,让「重构前」这个状态有据可查。"},{icon:"GraduationCap",title:"讲代码结构",body:"讲师把学生的代码或者教材里的例子当场变成图 —— 讲继承、讲控制流、讲服务边界的时候不用现画白板。"}],faq:[{q:"从代码画出来的图准吗?",a:"这是模型尽力而ä¸
110ºçš„语义理解,不是基于语法树的静态分析。代码结构清楚的时候相当可靠;元编程多、动态类型技巧多、嵌套很深的代码,建议先看一遍。把它当一份很强的初稿,不是事实。"},{q:"支持哪些编程语言?",a:"模型读得懂的都行 —— JavaScript、TypeScript、Python、Java、Go、Rust、C#、Ruby 和大部分主流语言都可以。中间没有语言服务器和编译器参与,所以伪代码和不完整的片段也能用,只是准确度会降。"},{q:"能粘整个仓库或者一个很大的文件吗?",a:"粘能舒服塞进一次对话的量就好 —— 一个类、一个函数、一个路由处理、一个 docker-compose。这是片段转图表的工具,不是整仓库可视化。要理大范围架构,一次画一块。"},{q:"从代码能画出哪几种图?",a:"类图(从类和接口定义)、流程图(从函数的控制流)、架构图(从 docker-compose 这类服务定义或者基础设施配置)。在描述里说清楚要哪一种,结果更好。"},{q:"生成之后能改吗?",a:"能。Mermaid 源码会在分屏里跟预览并排 —— 直接改文字,或者把原来的描述写细一点重新生成。"},{q:"免费吗?",a:"免费,不用注册,按 IP 有每天的次数上限。预览区状态栏能导出 SVG 和 PNG。"}]},"ai-diagram-from-json":{keyword:"AI JSON 生成图表",metaTitle:"AI JSON 生成图表 —— 粘 JSON 出 ER 图和类图 · VizText",metaDescription:"粘一段 JSON —— 接口返回、schema、文档样例 —— 它把里面隐含的实体和关系画成 ER 图或类图。免费,能导出 SVG 和 PNG。",tagline:"粘一段 JSON —— 接口返回、schema、文档样例 —— 拿一张 ER 图或类图。",examples:[{title:"嵌套接口返回 → ER 图",prompt:'从这段 JSON API 响应画一个 ER 图,把嵌套对象当作相关实体:{ "order": { "id": 123, "customer": { "id": 9, "email": "[email protected]" }, "items": [ { "productId": 55, "name": "Widget", "quantity": 2, "unitPrice": 9.99 } ], "total": 19.98 } }'},{title:"JSON Schema → 带类型的 ER 图",prompt:'从这段 JSON Schema 画一个 ER 图:{ "User": { "id": "integer", "email": "string", "posts": { "type": "array", "items": { "$ref": "Post" } } }, "Post": { "id": "integer", "title": "string", "authorId": "integer", "comments": { "type": "array", "items": { "$ref": "Comment" } } }, "Comment": { "id": "integer", "body": "string", "postId": "integer" } }'},{title:"MongoDB 文档 → ER 图",prompt:'从这份 MongoDB 文档画一个 ER 图,把内嵌子文档当作从属实体,把 ObjectId 字段当作外键引用:{ "_id": "...", "customerId": "...", "shippingAddress": { "street": "...", "city": "..." }, "lineItems": [ { "sku": "...", "qty": 2 } ], "status": "paid" }'},{title:"OpenAPI schema → 类图",prompt:"从这段 OpenAPI 组件 schema 画一个 UML 类图:UserDTO { id: integer, email: string, roles: string[] },CreateUserRequest { email: string, password: string },UserResponse 继承 UserDTO 并加 createdAt: string。标出继承和组合关系。"}],useCase:`JSON 一层两层还好读,嵌到第五层数组套对象就开始痛苦了,这时候画图有用。把原始 JSON 粘进来 —— 接口返回、JSON Schema、文档数据库的样例、OpenAPI 的组件定义 —— 拿回一张图:结构偏关系型(实体之间有隐含的外键)就画 [ER 图](/zh/erd-from-text),更像带类型的对象模型(DTO、带继承的请求和返回结构)就画[类图](/zh/class-diagram-from-text)。
111
112它推断关系的方式跟一个有经验的后端读 JSON 差不多:嵌套对象按上下文变成内嵌实体或者外键关系,对象数组变成一对多,看着像 ID 引用的字段(userId、authorId、Mongo 的 ObjectId)即使没有显式声明也当外键处理。输入是带 $ref 的 JSON Schema 的话,这些引用直接照用,不用猜。
113
114这是一种解读,不是 schema 校验器。真正有歧义的 JSON —— 一个嵌套对象到底是内嵌数据还是规范化之后的引用,两种设计都说得通 —— 它给一个合理的判断。你在拿这张图当正式的表结构设计文档之前,先核对一下它标的是一对多还是一对一。它最擅长的是一步把「两百行看不懂的 JSON」变成「数据长这样」。`,scenarios:[{icon:"FileJson",title:"接口文档",body:"一个嵌套很深的接口返回,原始 JSON 放在文档里没法读。粘进来,拿生成的 ER 图替掉它。"},{icon:"Database",title:"文档数据库的结构记录",body:"MongoDB 这类文档数据库不强制结构,粘几份真实文档、把隐含的结构画出来,往往是记录「实际存了什么」的唯一办法。"},{icon:"Bug",title:"看懂一大坨 payload",body:"bug 报告里附着一个巨大的 JSON,画成实体图比一层层数缩进容易理清。"},{icon:"ClipboardCheck",title:"开发之前先评审接口设计",body:"先把打算返回的结构写成 JSON,画出来,后端一行代码没写就能拿到关于数据模型的反馈。"},{icon:"Handshake",title:"前后端对接口",body:"前后端要就一个返回结构达成一致的时候,一张图比在群里贴几条示例消息更像个契约。"}],faq:[{q:"它是怎么从 JSON 里认出实体和关系的?",a:"嵌套对象按上下文变成内嵌实体或者外键关联,对象数组变成一对多,长得像 ID 的字段(userId、authorId、ObjectId)即使没有显式声明也当外键。输入带 $ref 的 JSON Schema 时,这些引用直接照用,不靠猜。"},{q:"支持带 $ref 的 JSON Schema 吗?",a:"支持。粘一份定义之间用 $ref 互相引用的 JSON Schema,它会把每个被引用的定义当成独立实体,按引用关系连起来 —— 数组里的 ref 连成一对多,单个 ref 按上下文连成一对一或者多对一。"},{q:"跟 ER 图那个页面有什么区别?",a:"ER 图页面从一段大白话描述的结构出发。这个页面从真实的 JSON 出发 —— 真实的接口返回、schema 文件或者文档样例 —— 反推出实体结构。看你手上有的是一段描述,还是一份真实数据。"},{q:"会不会把一对多认成一对一?",a:"真有歧义的时候会 —— 一个嵌套对象既可能是内嵌数据,也可能是规范化之后的引用。它给一个最合理的判断,你把结果当起点,跟实际的数据模型对不上,就在分屏编辑器里改过来。"},{q:"拿到的是 ER 图还是类图?",a:"看你怎么说。说「画一张 ER 图」拿到关系型的视角,说「画一张类图」拿到带类型的对象模型视角(适合 DTO、带继承的请求和返回结构)。不指定的话,它按上下文判断。"},{q:"免费吗?",a:"免费,不用注册,按 IP 有每天的次数上限。预览区状态栏能导出 SVG 和 PNG。"}]},"chatgpt-mermaid-fixer":{keyword:"ChatGPT 画图",metaTitle:"ChatGPT 画图 —— 把它写的 Mermaid 渲染出来 · VizText",metaDescription:"ChatGPT 会写 Mermaid,但画不出来。把它的输出粘进来即可渲染、编辑、导出 SVG/PNG,附让 ChatGPT 输出干净语法的提示词。免费,不用注册。",tagline:"ChatGPT 负责写 Mermaid,这里负责画出来 —— 粘贴、修语法、改图、导出。",ctaCode:`flowchart TD
115    A[打开登录页] --> B[填邮箱和密码]
116    B --> C{密码对吗}
117    C -->|不对| D[提示错误]
118    D --> B
119    C -->|对| E{开了两步验证吗}
120    E -->|没开| H[建会话]
121    E -->|开了| F[发六位验证码]
122    F --> G{验证码对吗}
123    G -->|不对| F
124    G -->|对| H
125    H --> I[跳转到控制台]`,comparison:{heading:"ChatGPT 能帮你做到哪一步,剩下的这里接着做",stepLabel:"环节",colA:"在 ChatGPT 的聊天窗口里",colB:"在这个页面上",rows:[{step:"把一段描述变成 Mermaid",a:"这一步是它擅长的。你用大白话把流程讲清楚,它就能写出一段 Mermaid 代码,多数时候和你想要的差不了多少。",b:"同样的事情这个页面也能做。不过如果 ChatGPT 已经把代码写好了,你就不必再生成一遍,直接粘贴过来就可以。"},{step:"看到图本身",a:"看不到。聊天窗口把 Mermaid 当成一段代码显示出来,因为它渲染的是 Markdown,不是图。你读到的始终是语法,而不是画出来的形状。",b:"代码一进到画布上,图就画出来了。中间不需要复制到别的地方,也不需要再打开第三个工具。"},{step:"发现代码是坏的",a:"很难发现。少了一个括号的代码和完全正确的代码,在聊天窗口里看起来是一样的。要等到你把它放进某个真正会渲染它的地方,才知道它是坏的。",b:"粘贴进来的那一刻就知道了。要么图正常画了出来,要么预览区下方直接给出报错。"},{step:"修语法错误",a:"你需要把报错贴回去再问一遍。有时候它只补上出错的那一行,有时候它会把整张图重写一遍,连节点的名字都换掉了。",b:"报错会写明是第几行出的问题,并用一个尖号指到出错的位置。æ
125ºç å°±åœ¨ç”»å¸ƒæ—è¾¹çš„编辑器里,你改掉那一行,图会立刻重新画一遍,其余部分保持不动。"},{step:"只改一个节点",a:"你把要改的地方描述一遍,它还给你的是一张全新的图,其中也包括你本来就已经满意的那些部分。",b:"你可以直接改源码里的那一行,也可以切换到对话模式,针对画布上现在这张图说一句你要改什么。"},{step:"拿到一个文件",a:"聊天窗口里没有这一步。你需要把代码复制出去,再自己找一个能把它渲染出来的地方。",b:"预览区的状态栏可以直接导出 SVG 和 PNG,也可以把整理好的 Mermaid 源码复制走。"}],note:"本站与 OpenAI 没有任何隶属关系,也未获得它的背书或赞助。ChatGPT 是 OpenAI 的商标。这张表比较的是同一件事情的前后两个环节,而不是两个互相替代的产品:ChatGPT 写出来的 Mermaid 总需要有个地方渲染成图,这个页面补的就是后面这一段。左边一栏描述的是本文撰写时 ChatGPT 网页版的表现。"},examples:[{title:"带两步验证和锁定的登录流程",prompt:"画一张登录流程图:先填邮箱和密码,开了两步验证的再填验证码。密码错了提示并退回表单,连错 5 次锁定账号。"},{title:"微服务的一次请求路径",prompt:"画时序图:浏览器请求 API 网关,网关去鉴权服务验身份,然后调订单服务,订单服务写 Postgres 并往 Kafka 发一条事件。"},{title:"从需求文档反推数据库结构",prompt:"画一张博客平台的 ER 图:用户写文章,文章有评论和标签,标签和文章是多对多。标出主键和外键。"},{title:"订单生命周期状态机",prompt:"画订单的状态图:已创建、已支付、已打包、已发货、已签收。支付失败退回已创建,发货前的任何状态都能取消。"}],useCase:`让 ChatGPT 画图,它给你的是一段文字,不是一张图。多数时候那段文字是 Mermaid —— 一种纯文本的画图语法,长得像「flowchart TD / A[开始] --> B[结束]」。有时候是 ASCII 拼的图,有时候是「第一个框写什么、箭头指向哪」的编号说明。唯独不会是一张你能直接贴进文档的图。
126
127这不是你提示词写得不好。ChatGPT 的对话框里就没有 Mermaid 渲染器。它能用图像模型生成一张图片,但那是一张位图 —— 框里的文字经常是糊的,节点动不了,写错一个字也改不了。只要这张图最后要进设计文档、进 README、进 PPT,走 Mermaid 这条路就是对的,你缺的只是把语法变成图的那一步。这页就是干这个的:把 ChatGPT 给你的那段粘进来,看到图,然后直接改。
128
129想让它输出一段能直接用的 Mermaid,提示词要写得很具体。比如:「只输出 Mermaid 代码,放在一个代码块里,用 flowchart TD,前后不要任何解释。节点文字不超过 8 个字,里面不要出现括号、冒号和引号。」最后那句比看上去重要 —— 标签里没转义的标点,是模型生成的 Mermaid 解析失败的头号原因。
130
131模型写 Mermaid 常犯的错就那四类,认得出来就好办。一是标签里带标点:写成 A[检查用户(管理员?)] 直接把解析器卡住,得给文字加引号。二是自己发明箭头:每种图的箭头写法是固定的,模型偶尔会把别的图的箭头拿过来用。三是一段里混了两种图,比如流程图里出现时序图的箭头。四是代码块外面多留了一句解释的话。这些错误粘贴进来之后,报错会写明是第几行出的问题,并用一个尖号指到出错的位置,而不是给你一块白板。你改掉那一行就可以了,也可以切换到[对话模式](/zh/chat-to-diagram),用一句话说清楚你要改什么。
132
133图画出来之后就是正常的编辑工作了。分屏的左边是源码,右边是图,你改动其中一边,另一边会立刻跟着变。需要放进文档和 PPT 就导出 SVG,需要发到群里或者贴进工单就导出 PNG,也可以把 Mermaid 源码复制回去,和代码一起提交。如果你根本不想经过 ChatGPT 这一道,这个页面也能直接从一段中文描述生成图,上面那四张示例卡里的写法可以照着用。
134
135关于名称:VizText 是独立产品,与 OpenAI 无隶属、无背书、无赞助关系。ChatGPT 和 GPT 是 OpenAI 的商标。这一页讲的是怎么把 ChatGPT 等语言模型写出来的画图语法渲染æ
135ˆå›¾,没有使用 OpenAI 的品牌标识,也不主张与其存在任何关联。`,scenarios:[{icon:"MessageSquare",title:"ChatGPT 给的是代码不是图",body:"回答末尾给你的是一段 Mermaid 代码,你既看不出它长什么样,也看不到图。粘贴到这里就能直接变成图,不用安装任何东西,也不用注册。"},{icon:"Bug",title:"那段 Mermaid 解析不了",body:"常见的原因有三种:标签里的括号没有加引号,箭头的写法是从别的图类型借来的,或者代码块外面多留了一句话。报错会写明是第几行出的问题,而不是给你一块白板。"},{icon:"RefreshCw",title:"只有一个框不对,其他都挺好",body:"回去让 ChatGPT 改一个小地方,它常常会把整张图重写一遍。在这里你可以只改那一个节点,也可以用对话模式说一句要求,其余部分原样保留。"},{icon:"Download",title:"这张图最后要进文档或 PPT",body:"导出成 SVG,放进 Notion、Confluence 或者飞书,怎么放大都是清楚的;导出成 PNG,可以直接发到群里或者贴进工单。这两样聊天窗口都给不了你。"},{icon:"FileCode",title:"图要跟代码放一起",body:"把整理好的 Mermaid 源码复制回去,提交进 README 或者 ADR。它是纯文本,在 code review 里能看出这次改了哪一行,而截图做不到这一点。"}],faq:[{q:"ChatGPT 能画图吗?",a:"它能写出画图的语法 —— 多数时候是 Mermaid —— 但对话框不渲染,所以你看到的是代码不是图。它也能用图像模型生成一张图片,但那是位图,文字经常不准,而且改不了。实际可行的路子是让它写 Mermaid,再拿到能渲染、能编辑的地方画出来。"},{q:"ChatGPT 会渲染 Mermaid 吗?",a:"不会。ChatGPT 回答里的 Mermaid 只是代码块里的一段文字。要把它变成图,需要一个 Mermaid 渲染引擎,而这正是这个页面提供的:粘贴进去,图就画出来了。"},{q:"这是 OpenAI 做的吗?",a:"不是。VizText 是独立产品,与 OpenAI 无隶属、无背书、无赞助关系。ChatGPT 和 GPT 是 OpenAI 的商标。做这一页是因为 ChatGPT 的用户需要一个地方把它写的 Mermaid 渲染出来。"},{q:"什么提示词能让 ChatGPT 输出干净的 Mermaid?",a:"三件事说死:只要代码、指定图类型、约束标签。比如「只输出 Mermaid 代码,放在一个代码块里,用 flowchart TD,不要任何解释。节点文字不超过 8 个字,里面不要出现括号、冒号和引号。」最后这条约束能挡掉最常见的那类解析失败。"},{q:"为什么 ChatGPT 写的 Mermaid 老是语法错误?",a:"四类原因占了绝大多数:标签里的标点没加引号、箭头写法是从别的图类型借来的、一段里混了两种图、代码块外面留了人话。粘进来之后报错会指明是哪一行,你改那一处就行,不用整张重新生成。"},{q:"别的模型的输出能用吗?",a:"可以。只要输出的是 Mermaid 就没有区别,无论它来自 Claude、Gemini、Copilot、你本地跑的模型,还是你自己手写的代码,走的都是同一条路。这个页面没有任何部分是绑定某一家模型的。"},{q:"渲染出来之后还能改吗?",a:"可以。分屏的左边是 Mermaid 源码,右边是图,你改动其中一边,另一边会跟着变。也可以切换到对话模式,用一句话说清楚要改什么,不需要自己动手写语法。"},{q:"免费吗?",a:"免费。粘贴 Mermaid 渲染和编辑不用注册。从描述生成图走的是全站同一个免费额度,按 IP 有每天上限。预览区状态栏能导出 SVG 和 PNG。"}]}}};e.s(["DIAGRAM_TYPES",0,a,"DIAGRAM_TYPE_ICONS",0,{auto:"Sparkles",flowchart:"GitBranch",sequence:"ArrowLeftRight",erd:"Database",state:"CircleDot",class:"Box",mindmap:"Network",gantt:"GanttChart",arch:"LayoutTemplate"},"DIAGRAM_TYPE_KEYS",0,i,"getDiagramType",0,function(e,i=t.DEFAULT_LOCALE){let r=a.find(t=>t.slug===e);if(!r)return;let s=o[i]?.[e];if(s)return{...r,...s}},"mapBackendTypeToKey",0,function(e){return e?Object.entries(r).find(([,t])=>t===e)?.[0]??"auto":"auto"}
135,"mapKeyToBackendType",0,function(e){return r[e]},"normalizeDiagramType",0,function(e){if("string"==typeof e)return i.includes(e)?e:void 0}])}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.