Online Tools Toolshu.com Log In Sign Up

Folder Directory Tree Generator

Choose a folder, or drop it here
Only file names are read. Nothing is uploaded
Choose another folder

Drop the folder above when you need empty directories.

Example
project
├── src
│   └── index.js
└── README.md
Tool Introduction

The folder directory tree generator converts a local folder or a list of paths into indented tree text that you can paste straight into a README, a blog post, a design document or a bug report. Names and nesting levels are read in your browser, so no file content is uploaded and folder names that look private are still safe to share.

Key Features

  • Pick or drop a folder: click the area at the top to choose a folder, or drag it in to build the whole tree at once.
  • Empty folders kept on drag: when you drop a folder, sub-folders without files are included, which is useful for showing a project skeleton before it is filled in.
  • Generate from paths: when choosing a folder is inconvenient, paste one path per line and end directories with /. Absolute paths are handled too, and a shared parent folder is detected automatically so only the meaningful level is shown.
  • Sample data: the path panel has a Fill sample paths button that writes a small demo project for a quick try-out.
  • Ignore list: one name per line, with * wildcard support. Common entries such as node_modules, .git, dist, build and __pycache__ are preset, and every change is applied immediately.
  • Depth limit: cap how many levels are printed; deeper branches collapse into an ellipsis so a wide repository does not flood the page.
  • Display switches: folders first, show the root name, add a trailing slash after folders — combine them to match the output you need.
  • Counts and export: the header shows how many folders and files were found, and the result can be copied or saved as a TXT file named after the root folder.
  • Your input is kept: pasted paths, the ignore list and the depth value stay on your device and are refilled after a refresh, which makes fine-tuning easy.
  • Multiple roots and sorting: several side-by-side root folders are supported, entries are sorted by name, and numbers inside names are ordered naturally.

Use Cases

  • Documenting the layout of a project in a README so contributors understand it at a glance.
  • Pointing out where a file sits when reporting an issue, asking a question in a forum or reviewing code.
  • Exporting the structure of a note vault, asset library or archive for backup checks.
  • Showing what a folder should look like in a tutorial or walkthrough.
  • Saving a text snapshot of a project layout before a handover or a deployment note.

How to Use

  1. Click the area at the top and choose a folder, or drag the folder into that area.
  2. Add the names you want hidden to the ignore list, one per line, using * for wildcard matching.
  3. Set a maximum depth and switch on folders-first, root name or trailing slashes as needed — the tree updates live.
  4. Copy the result or download it as a TXT file and paste it into your document.

About Directory Trees

A directory tree expresses nesting with indentation and branch glyphs: siblings are joined by vertical connectors, and the last entry in a group gets a different corner mark. Compared with a flat list, it makes it obvious which files belong to which folder and whether a folder still has children. You will see this style in repository documentation and in the output of tree commands, and it keeps its alignment anywhere monospaced text is preserved.

FAQ

Q: Why are empty folders missing after I pick a folder?

A: Picking a folder only returns paths of files, so folders without files are never read. Drag the folder into the top area instead, and empty sub-folders are kept.

Q: Are my files uploaded anywhere?

A: No. Only names and nesting levels are read; file contents are never opened and nothing is sent to a server. The generated text is copied or downloaded by you.

Q: Can I paste an already drawn directory tree?

A: Not directly. The path mode expects one path per line, such as src/index.js, README.md or logs/. If the text contains branch symbols or code fences, the tool tells you to switch to a path list.

Q: What happens with a very large folder?

A: The result area shows progress while the entries are read and then prints the full tree. Combining the ignore list with a depth limit keeps long listings compact.

Q: Does it work on a phone?

A: Yes, the layout adapts to small screens and dark mode. Since mobile browsers restrict folder picking, the path mode is usually the smoother option on a phone.

Comment area

Loading...