An org chart data generator that builds a fake company hierarchy with a CEO at the top, leaders below, and individual contributors at the leaves. It produces either an indented tree to read or flat JSON with managerId links for feeding org chart visualizers and HRIS demos.
How it works
You choose two parameters: how many levels deep the hierarchy runs and the maximum number of direct reports any manager may have. Starting from a single CEO, the generator gives each manager a random span of reports up to your maximum, so the tree is uneven rather than a tidy pyramid. Titles scale by depth — CEO, then VPs, directors, managers, and finally individual contributors — and departments are set at the top level and inherited down each branch.
Every employee carries an id, name, title, department, managerId, and level. The CEO’s managerId is null, making them the root of the tree. Regenerate advances the seed for fresh names and shape.
Output formats
Indented tree — a human-readable outline, useful for reviewing structure during design:
CEO — Jordan Reyes
VP — Priya Okafor (Engineering)
Director — Mia Patel
Manager — Sam Lin
IC — Alex Torres
Flat JSON — an array of records where each employee references their manager by id, the shape most org chart libraries and HRIS imports expect:
{
"id": "E5",
"name": "Mia Patel",
"title": "Director",
"department": "Engineering",
"managerId": "E2",
"level": 2
}
Most tree-rendering libraries (D3 stratify, React org-chart components, spreadsheet import tools) accept this flat-with-parent-id format directly.
Choosing the right depth and span
| Depth | Max span | Approximate size | Good for |
|---|---|---|---|
| 2 | 3 | ~10 employees | Small startup UI mockup |
| 3 | 3 | ~40 employees | Mid-size team demo |
| 4 | 4 | ~85 employees | Enterprise HRIS prototype |
| 5 | 3 | ~120 employees | Large org visual test |
Keeping the span uneven (random up to your max) makes the chart look realistic — real org charts are never perfect pyramids. If you need a perfectly balanced tree, lower the max span so the randomness matters less at scale.
Practical notes
- Use the indented tree first to sanity-check the reporting structure, then copy the flat JSON for your code.
- Departments are inherited down each branch, so all of a VP’s reports share a department. This mirrors how most real org charts are structured and makes department-level filtering trivial.
- Because names are generated from a seeded pool and IDs are stable within a session, you can regenerate the shape and keep the same employee records by reusing the same seed in your fixture system.