Your files never leave your device. All processing happens locally in your browser.
How do I make a decision tree?
Open AnyTool Decision Tree Generator and you start with a root decision (a question) and a couple of labelled branches already on the canvas. Select a node and add a labelled branch — you type the branch label (e.g. Yes / No or any option), the text for the new node, and whether it is a further decision or a terminal outcome. Decision nodes are rounded boxes and outcomes are pills, and the branch label sits right on the connector so the logic reads at a glance. Double-click or press F2 to rename a node, edit a branch label inline, delete a node to prune it and its subtree, and switch the layout between top-down and left-to-right. You pan by dragging the empty canvas and zoom with the scroll wheel, pinch or the Fit button, and on-screen buttons add or edit nodes so it works on a phone too. The whole tree is saved automatically in this browser’s localStorage, and you can export it as a PNG image, an SVG vector or a JSON file (re-import any time) — everything runs 100% in your browser, nothing is uploaded.
Root decision (question), then add labelled branches (Yes / No or any option) to each decision node
Two node types — decision (rounded box) and terminal outcome (pill) — with the branch label drawn on the connector
Auto tidy-tree layout, switchable top-down or left-to-right; pan by dragging, zoom by scroll / pinch / Fit
Edit node text (F2 / double-click) and branch labels inline; delete prunes a node and its subtree
Export PNG, SVG and JSON; import JSON to restore — saved locally, 100% client-side, nothing uploaded
What is
Decision tree (diagram)
A decision tree is a flowchart-like diagram that maps out choices and their possible consequences. It starts from a single root decision — a question — that branches via labelled edges (often Yes / No, or named options) to child nodes, each of which is either a further decision or a terminal outcome/result, so every path tells the story of a specific choice leading to a result. Unlike a mind map (which radiates loosely-associated ideas around a centre) or a generic flowchart (which can loop back), a decision tree is strictly hierarchical and decision-focused. AnyTool’s Decision Tree Generator is a 100% client-side diagramming tool: a tree model with a root decision, labelled branches and decision/outcome node types, an automatic tidy-tree layout (top-down or left-right) with curved connectors, pan-and-zoom and PNG/SVG/JSON export, saved to your browser’s localStorage.
It is saved only in your browser’s localStorage and never uploaded — there is no account, server or tracking, so it stays completely private to this browser.
AnyTool Decision Tree Generator is 100% client-side. The whole tree — every node, its text, its type (decision or outcome) and the labelled branches that link them — is stored in your browser’s localStorage and is never sent to any server. There is no sign-up, no login and no analytics, and the tool keeps working offline once the page is cached. Because the data lives only in your browser, clearing your browsing data or switching to a different browser or device removes it, so use Export to download a JSON backup (or a PNG or SVG) you can keep and re-import any time.
A decision node is a question that branches further via labelled edges; an outcome is a terminal result at the end of a path with no branches below it.
In this tool every node is one of two types. A decision node holds a question and fans out through labelled branches — Yes / No or any options you name — to further nodes; it is drawn as a rounded box. An outcome (a leaf) is the final result of a path: it is terminal and has no branches below it, drawn as a pill. You can switch a node’s type from its inspector at any time; turning a decision into an outcome prunes the branches beneath it, and adding a branch to an outcome turns it back into a decision. This two-type model — decisions that branch and outcomes that end — is exactly what distinguishes a decision tree from a free-form mind map.
No — it is a visual diagramming tool that maps out choices and outcomes; it does not compute, score or recommend a decision for you.
The Decision Tree Generator is a diagram editor, not a decision engine. It helps you lay out the structure of a decision — the questions, the labelled branches and the outcomes — so the logic is easy to see and share, but there is no probability maths, no expected-value calculation and no AI judgement. You decide the wording, the branches and which paths end in which outcomes; the tool simply draws and stores the tree tidily. For that reason it is ideal for documenting and communicating a decision process rather than for automatically choosing an answer.
Use Export to download a PNG image, an SVG vector or a JSON file, and Import to load a JSON file back on any browser or device.
Because the tree is a personal, single-device tool with no cloud sync, exporting is how you back it up, share it or move it. PNG export renders the canvas to an image with html2canvas so you can drop it into a deck, doc or email; SVG export hand-builds a crisp, theme-independent vector of the whole tree including the branch labels; and JSON export downloads the entire model — title, root and every node with its type and branches — as a formatted file that Import reads back, validating and migrating the data (dropping broken references and pruning anything unreachable from the root) so an older or hand-edited file still loads safely. Keep an exported JSON backup so a cleared cache or a switched browser never loses your work, and use the same file to carry a tree to another device.
Detailed Explanation
⚙️Methodology
The Tree Model, Node Types and Tidy-Tree Auto-Layout
AnyTool Decision Tree Generator keeps a single tree object as its source of truth: a title, a rootId, and a nodes record mapping each id to a node with text, a type of either “decision” or “outcome”, and an ordered array of labelled edges (each edge is a { label, nodeId } pair). Only decision nodes carry branches; an outcome is terminal, so adding a branch to an outcome converts it into a decision and marking a node as an outcome prunes the subtree beneath it. Positions are never stored; they are derived by a pure tidy-tree layout recomputed on every change. A post-order walk gives each visible leaf the next free slot on the cross axis and centres every parent on the average of its children, while the node’s position on the growth axis is its depth × a fixed level gap — producing a tree with siblings that never overlap and parents centred over their subtrees. A direction flag flips the axes: in top-down mode depth sets y and the leaf walk sets x; in left-right mode depth sets x and the walk sets y. Each parent-to-child link is rendered as a cubic-bézier connector tinted by the child branch’s type colour, with the branch label drawn on a small chip at the curve’s midpoint.
Tree = title + rootId + nodes record (id → { text, type: decision|outcome, children: { label, nodeId }[] })
Only decision nodes branch; outcomes are terminal — adding a branch to an outcome makes it a decision again
Positions are derived, not stored: depth × level gap on the growth axis; a post-order leaf walk on the cross axis
A direction flag flips top-down (depth → y) and left-right (depth → x); layout recomputes (useMemo) on every change
Connectors are cubic-bézier curves tinted by node type, with the branch label on a chip at the midpoint
📖How It Works
Branch Labels, Editing, Navigation and Validation
Building a tree centres on adding labelled branches to a selected decision node: you supply the branch label (e.g. Yes / No or any option), the text for the new node, and whether it is a further decision or a terminal outcome. Node text is edited inline with F2 or a double-click, a branch label is edited inline from the selected-node inspector, and a node’s type can be switched between decision and outcome at any time. Delete removes a node together with its whole subtree (the root cannot be deleted). The arrow keys navigate the tree — Up to the parent, Down to the first child, Left/Right to the previous/next branch — and every action has a toolbar button plus a sticky mobile bar, so the tool is equally usable by mouse or touch; pan is a drag of the empty canvas and zoom is the scroll wheel, a pinch gesture or +/−/Fit buttons. On load and on import the model is validated and migrated: edges pointing at missing nodes are dropped, self-loops are removed, outcomes are stripped of any stray children, and anything unreachable from the root is pruned so an orphan or accidental cycle can’t corrupt the tree.
Add a branch by supplying its label, the new node’s text, and decision-or-outcome type
Edit node text inline (F2 / double-click); edit branch labels inline; switch a node’s type any time
Delete removes a node and its subtree; arrow keys move parent / first-child / previous-or-next branch
Every shortcut has a toolbar button and a sticky mobile bar; pan = drag, zoom = scroll / pinch / +/−/Fit
Import validates and migrates: drops broken edges and self-loops, strips outcome children, prunes unreachable nodes
🔒Privacy & Security
Local Storage, Three Exports and Honest Limits
Everything runs locally in the browser with no account, server or tracking. The whole tree is serialised to localStorage on every change, so it survives a refresh and works offline once the page is cached — nothing is ever uploaded. There are three exports: a PNG of the canvas via html2canvas (lazy-loaded only on click, rendered at the untransformed natural size for a crisp image), a hand-built standalone SVG vector of the entire tree (with the branch-label chips and wrapped node text), and a full-fidelity JSON of the model that Import reads back. Honestly, this is a diagramming tool, not a decision engine: it maps out choices and outcomes but does not compute, score or recommend a decision for you — there is no probability maths, no expected-value calculation and no AI judgement. It is also a personal, single-device tool with no cloud sync, shared link or real-time collaboration, and because the auto-layout owns positioning, nodes snap to their computed spots rather than staying wherever they are dragged. Because clearing browsing data erases the tree, keeping an exported JSON backup is recommended, and resetting to the starter example asks for confirmation first.
Decision Tree Generator: in-browser (AnyTool) vs typical online decision-tree makers
Capability
AnyTool
Typical online decision-tree makers
Where it runs
100% in your browser, nothing uploaded
Hosted — tree stored on a server
Account
None — open and use
Usually sign-up / login required
Labelled branches
Yes — Yes/No or any option on each edge
Yes
Decision vs outcome nodes
Two explicit node types, switchable
Sometimes (shape conventions)
Auto-layout
Tidy tree, top-down or left-right toggle
Yes (often drag-to-place)
Pan & zoom
Drag to pan, scroll / pinch to zoom
Yes
Export / backup
PNG + SVG + JSON; import JSON
Cloud sync; export sometimes paid
Recommends a choice
No — a diagram tool, not a decision engine
No (also diagram-only)
Privacy
Tree only in localStorage
Data held in the vendor cloud
AnyTool runs the whole canvas locally and uploads nothing; it is a private, single-device decision-tree diagram tool with PNG/SVG/JSON export rather than a synced, collaborative service — and it maps choices and outcomes without recommending a decision for you.