Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To create an organizational chart in JavaScript, represent each person or unit as a node and connect it to a parent. Then choose a chart library that matches your data shape, interactions, framework, deployment requirements, and license. The most common inputs are parent-ID rows, nested children objects, or CSV records.

Choose the data model first

Your application data rarely matches a chart library exactly, so treat conversion as a deliberate mapping layer rather than coupling business objects to a vendor API.

Parent-ID records

Each row contains a unique identifier and, except for the root, a parent identifier. This is the model documented by Google Charts and BALKAN OrgChart JS.

const people = [
  { id: 'ceo', name: 'Avery Chen', pid: null, title: 'Chief executive officer' },
  { id: 'eng', name: 'Jordan Lee', pid: 'ceo', title: 'Engineering' },
  { id: 'sales', name: 'Sam Rivera', pid: 'ceo', title: 'Sales' }
];

Google’s OrgChart uses a table with a node ID, an optional parent ID, and an optional tooltip. A node can have zero or one parent and any number of children. BALKAN’s examples use id and pid.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Nested JSON

Nested data places descendants inside a children array. dabeng OrgChart documents this approach for local or remote JSON.

const hierarchy = {
  id: 'ceo',
  name: 'Avery Chen',
  title: 'Chief executive officer',
  children: [
    { id: 'eng', name: 'Jordan Lee', title: 'Engineering' },
    { id: 'sales', name: 'Sam Rivera', title: 'Sales' }
  ]
};

CSV

d3-org-chart documents CSV input. Keep your CSV columns stable and convert them to the fields your node template expects.

Four practical JavaScript approaches

d3-org-chart

The npm documentation describes a D3 v7-based chart with a chained data-and-render workflow:

import { OrgChart } from 'd3-org-chart';

const chart = new OrgChart()
  .container('.chart-container')
  .data(rows)
  .render();

Its documented features include CSV input, expand/collapse, zoom, layout changes, export, search, and interactive nodes. The npm page snapshot identified version 3.1.1, but that snapshot is not proof of the current release; check npm before installing.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

dabeng OrgChart

dabeng’s README documents nested or remote JSON, configurable title and content fields, custom node callbacks, orientation changes, initial depth, pan and zoom, drag-and-drop, and export. Remote examples also distinguish ordinary nested data from data that carries a relationship property for lazy loading. This makes it a candidate when users must edit or reposition nodes, not merely view a hierarchy.

BALKAN OrgChart JS

BALKAN’s example installs balkan-orgchart-js, creates a chart with node bindings, and loads records keyed by id and pid. Its repository documents JavaScript, React, Vue, and Angular package paths. Do not assume that the JavaScript core automatically provides an equivalent framework component; follow the documentation for the exact package.

BALKAN documentation states: “There are two types of licenses: Community and Commercial.” It describes the Community edition as limited-functionality and directs commercial users toward a free trial. Confirm the current terms for your edition, organization, and deployment before shipping.

Google Charts OrgChart

Google’s OrgChart package is a straightforward option when your input is already a parent-ID table. Load the orgchart package, construct a DataTable with string columns for node ID, parent ID, and optional tooltip, then draw the chart.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
google.charts.load('current', { packages: ['orgchart'] });
google.charts.setOnLoadCallback(() => {
  const data = new google.visualization.DataTable();
  data.addColumn('string', 'Name');
  data.addColumn('string', 'Manager');
  data.addColumn('string', 'Tooltip');
  data.addRows([
    [{ v: 'ceo', f: 'Avery Chen' }, '', 'Chief executive officer'],
    [{ v: 'eng', f: 'Jordan Lee' }, 'ceo', 'Engineering']
  ]);

  const chart = new google.visualization.OrgChart(
    document.querySelector('#chart')
  );
  chart.draw(data, { allowHtml: true });
});

Use this route when the documented parent/child model and draw flow cover your requirements. Validate any needed editing, search, export, accessibility, and large-hierarchy behavior rather than assuming those capabilities.

Compare libraries by the requirement that matters

Option Input shape Documented capabilities Framework and license considerations
d3-org-chart CSV and chart data supplied through .data() Expand/collapse, search, zoom, layout changes, export, interactive nodes D3 v7-based; verify current package version and maintenance
dabeng OrgChart Nested JSON; local or remote JSON Editing, drag-and-drop, pan/zoom, orientation, initial depth, export, callbacks Read the project README for integration and remote-data details
BALKAN OrgChart JS Records with id and pid Node binding and chart rendering; framework-specific packages are documented Community and Commercial licenses; Community is described as limited-functionality
Google Charts OrgChart DataTable rows containing node ID, optional parent ID, and tooltip Parent-child rendering and draw flow Assess whether its documented behavior covers your full interaction and output needs

This is a documentation-based comparison, not a performance, usability, accessibility, or security benchmark. Test the chart size and browser support that your application actually requires.

Build a mapping layer between application data and the chart

Keep your domain model independent from a visualization package. A parent-ID adapter can normalize names, titles, and relationships while detecting invalid hierarchies.

function toOrgRows(employees) {
  const ids = new Set();
  for (const employee of employees) {
    if (ids.has(employee.id)) throw new Error(`Duplicate id: ${employee.id}`);
    ids.add(employee.id);
  }

  return employees.map(employee => ({
    id: String(employee.id),
    pid: employee.managerId == null ? null : String(employee.managerId),
    name: employee.displayName,
    title: employee.jobTitle ?? ''
  }));
}
  • Require one unique ID per node.
  • Allow exactly one root unless the selected library explicitly supports a forest.
  • Reject missing parents and cycles before rendering.
  • Escape or safely bind user-controlled text when a library allows HTML templates.
  • Paginate or lazy-load very large structures only when the selected library documents a compatible remote-data pattern.

Match the implementation to user interactions

Read-only hierarchy

Choose the simplest parent-ID or nested-data option that renders the required levels. Google Charts can fit a basic draw flow; d3-org-chart adds documented search, zoom, layout, and export controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Exploration and search

Use a library that explicitly documents expand/collapse and search, such as d3-org-chart. Decide whether search should reveal a node’s ancestors, select a result, or simply filter your own data; the package feature list does not define your application’s search behavior.

Editing and re-parenting

dabeng documents editing and drag-and-drop. Treat a drag as a transaction: validate the new parent, prevent cycles, save the change through your API, and re-render only after the server accepts it.

Framework application

For React, Angular, or Vue, verify the package and lifecycle instructions for the exact library. Create the chart after the container exists, update it when normalized data changes, and dispose of listeners and chart instances when the component unmounts.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Production checklist

  1. Define whether the chart is an organization, department, team, or another hierarchy.
  2. Choose nested, parent-ID, or CSV input and write a conversion function.
  3. Validate IDs, roots, parents, and cycles before rendering.
  4. List required interactions: expand/collapse, search, zoom, editing, drag-and-drop, export, or none.
  5. Check framework integration for the exact package, not just its JavaScript core.
  6. Review current browser support, maintenance activity, accessibility behavior, and performance at your expected node count.
  7. Read the current license for the exact edition and commercial use case.
  8. Test loading, empty data, malformed data, disconnected nodes, and failed remote requests.

Common failure modes

Nothing renders

Confirm that the container exists before initialization, the library has loaded, and the data callback runs. Log the normalized rows rather than the original domain objects.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Nodes appear disconnected

Check that every non-root pid or parent reference exactly matches an existing node ID and that IDs are consistently strings or numbers as required by the API.

The hierarchy loops

Run cycle detection before passing data to the chart. A manager cannot eventually be its own descendant.

Editing loses changes

Do not treat a visual drag as persistence. Send the proposed parent change to your backend, handle rejection, and restore the prior relationship when saving fails.

License uncertainty

Stop before production deployment and verify the current terms for the selected edition, organization, and distribution model. The terms documented for BALKAN do not apply automatically to d3-org-chart, dabeng OrgChart, or Google Charts.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The Bottom Line

Start with a normalized hierarchy and select the library whose documented data model and interactions match your application. Use d3-org-chart for a feature-rich D3 workflow, dabeng when editing and drag-and-drop matter, BALKAN when its framework packages and licensing fit, and Google Charts for a simple parent-ID draw flow. Confirm current maintenance, accessibility, performance, browser support, and license terms before committing.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.