Code Dependency Mapper

Map imports between your JavaScript, TypeScript, CSS, PHP and Python files: see a dependency graph, circular dependencies, unused files and external packages.

Tool

Was this tool useful?

About this tool

About Code Dependency Mapper

Choose a project folder (or a few files) and see which file imports which. The mapper reads import, require, include, use and @import lines, links them to the right files, draws a graph and lists circular dependencies, files that nothing uses and the external packages each project depends on. node_modules, vendor, dist and .git are skipped. Export the graph as SVG, Graphviz DOT, Mermaid or JSON.

How it works

Relative imports are resolved like Node.js does (./file, ./file.js, ./folder/index.js). Circular dependencies are found as groups of files that can reach each other (strongly connected components).

Example

a.js → b.js → c.js → a.js is reported as one circular group of 3 files; a file nobody imports and that imports nothing is listed as unused.

How to use this tool

  1. Choose a whole folder or drag code files in.
  2. Read the summary, the graph and the tables.
  3. Download the graph (SVG, DOT, Mermaid) or the data (JSON).

Frequently asked questions

Which languages are supported?

JavaScript and TypeScript (ES modules and CommonJS, JSX/TSX, Vue and Svelte script blocks), CSS/SCSS/LESS @import and @use, PHP include/require and use statements, and Python import statements.

Why is a circular dependency a problem?

Files that import each other can load in the wrong order (undefined values at start-up), make bundles bigger and make code harder to test and change.

Are path aliases like @/components resolved?

No – aliases from tsconfig or webpack are listed as external packages. Relative paths are resolved.

Is my data uploaded?

No. Everything is processed in your browser and stays on your device.

Does the Code Dependency Mapper send my data to a server?

No. The Code Dependency Mapper runs entirely in your browser using JavaScript, so tokens, code and data you paste stay on your device. You can even use it offline once the page has loaded.