All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

Folder Tree Generator

Turn a local folder or a pasted list of relative paths into a clean, deterministic directory tree - ASCII or Unicode style - ready to paste into documentation, READMEs, or planning docs. Everything runs locally in your browser.

Your folder is never uploaded. Only file and folder names and relative paths are read locally in your browser - contents are never opened or sent anywhere.
This is a structure-only tool. It never reads file contents, calculates storage analytics, renames files, or writes anything back to the selected folder. Looking for storage usage instead of a hierarchy diagram? Try the Folder Size Analyzer.

Select a folder to map

Nothing is uploaded - only names and relative paths are read on your device

Options

How to use Folder Tree Generator

Choose a local folder or switch to Paste paths, then click Generate. Folder mode uses the selected file names and relative paths; Paste paths builds missing parent folders from each line. The result can include a root label, branch connectors, folder markers, counts, and downloadable files.

  1. Choose Select folder and click Choose folder, or switch to Paste paths and enter one relative path per line.
  2. Click Generate after selecting a folder or entering paths.
  3. Set Branch style, Markers, Order, Hidden files (dotfiles), Depth limit (0 = unlimited), or the pattern fields.
  4. Review Nodes, Files, Folders, and Max depth, then choose Copy, TXT, CSV, or JSON.

Generate a tree from a folder or paths

In Paste paths, a trailing slash marks a folder. Every other non-empty line is treated as a file path, and intermediate folders are inferred.

src/index.js
src/components/Button.jsx
docs/
README.md

root
|-- docs/
|-- src/
|   |-- components/
|   `-- index.js
`-- README.md

With ASCII connectors and trailing folder markers, the paths above produce the sample tree. Blank lines are ignored. Backslashes become slashes, and leading slashes are removed. A path with a .. segment or a drive letter is rejected with its line number.

Choose branch, marker, and depth settings

Branch style selects Unicode branch characters or ASCII connectors such as |-- and `--. Markers can be None, Trailing slash on folders, or [DIR] / [FILE] labels. Show root label includes the root node. When it is enabled, Root label text (optional override) changes the displayed root name if you enter one.

Order keeps the encountered order or sorts naturally with folders before files. Depth limit (0 = unlimited) clears descendants below the selected depth. Hidden files (dotfiles) excludes path segments whose names start with ..

Filter entries and export the result

Include patterns (comma-separated, * ?) keeps files whose names or relative paths match one of the patterns. Exclude patterns (comma-separated, * ?) removes matching files. Both fields ignore letter case. In folder mode, the browser supplies file entries, so empty folders do not appear. Add an empty folder in Paste paths with a trailing slash.

An empty folder selection or empty Paste paths input leaves the workspace hidden. If folder selection is unavailable, switch to Paste paths. TXT contains the rendered tree. CSV and JSON contain the filtered, depth-limited manifest with path, type, and depth. When filters remove every child entry, the count cards show zero; with Show root label enabled, the output still contains the root label.

Examples with Copy, patterns, and depth

  • To place a repository tree in a README, select the folder, choose the branch and marker styles, then choose Copy.
  • To keep Markdown files, enter *.md in Include patterns (comma-separated, * ?) and choose JSON.
  • To keep only the upper levels, set Depth limit (0 = unlimited) and choose TXT.

When to use the file management generate tools

Use this page when the output should show names and hierarchy. Browse the File Management Generate Tools category for another file or folder generation task. The page makes no network request with selected names or pasted paths. It never reads file contents or writes back to the selected folder.

Frequently asked questions

How do I generate a directory tree from pasted paths?

Switch to Paste paths, enter one relative path per line, and click Generate. Add a trailing slash for a folder, including an empty folder.

Can I create an ASCII directory tree instead of Unicode?

Yes. Set Branch style to ASCII before clicking Generate. The output uses connectors such as |-- and `--.

Does Folder Tree Generator read file contents?

No. It reads file names and relative paths only. It does not upload them or modify the selected folder.

Why are paths with .. rejected?

Paths containing a .. segment are rejected because they can point outside the pasted tree. The error identifies the line so you can replace it with a self-contained relative path.

Related Tools

40 views