Skip to main content

Directory Tree Generator

Turn an indented file list or a set of slash-separated paths into a clean ASCII directory tree. Auto-detects the input format, supports box-drawing or plain-ASCII connectors, optional πŸ“/πŸ“„ icons, trailing folder slashes, and a compact layout.

Input

Options

Output

Generated Tree
 
Was this helpful?

Guides

The Directory Tree Generator turns a plain list of files and folders into a clean, readable ASCII directory tree β€” the kind you see in a project README, a Stack Overflow answer, or documentation. Paste an indented outline or a set of slash-separated paths, and it renders a properly connected tree with β”œβ”€β”€, └──, and β”‚ branch characters (or plain ASCII, or simple indentation).

How to use it

  1. Paste your structure into the input box. Two formats are accepted:
    • Indented list β€” one item per line, using spaces or tabs to show nesting (like a bullet outline without the bullets).
    • Slash-separated paths β€” one full path per line, e.g. my-project/src/index.ts.
  2. Leave Input Format on Auto-detect (it switches to paths mode when most lines contain a slash), or force a specific mode.
  3. Pick a Tree Style: box-drawing characters, plain ASCII (|--, `--), or spaces-only indentation.
  4. Toggle the options β€” file/folder icons (πŸ“/πŸ“„), a trailing slash on folders, and compact mode for tighter vertical spacing.

The tree regenerates as you type, and you can copy or download the result as tree.txt.

How does it know what's a file versus a folder?

Anything with children is a folder; a leaf node with no children is treated as a file. To force a folder that has no listed contents, add a trailing slash to its name (e.g. assets/). Folders get the πŸ“ icon and optional trailing slash; files get πŸ“„.

What's the difference between the tree styles?

Box-drawing uses Unicode line characters for the cleanest look and is ideal for GitHub READMEs and Markdown. ASCII uses only keyboard characters, which is safer for plain-text environments, code comments, or terminals with limited font support. Spaces only drops the connectors entirely and just indents each level β€” useful when you want a minimal outline.

Can I paste paths copied from my terminal?

Yes. Output from find . or a git ls-files listing works directly β€” put one path per line and the tool reconstructs the shared folders into a single tree. Duplicate parent folders are merged automatically, and insertion order is preserved.

Does it handle tabs and mixed indentation?

Tabs are normalized to four spaces, and the indent unit is inferred from the smallest indentation in your input, so two-space and four-space outlines both work. Keep indentation consistent within a single list for the most accurate nesting.

Privacy

This tool runs entirely in your browser. Your file list is never uploaded β€” the tree is generated locally on your device, so you can safely paste internal project structures without anything leaving your machine.

directorytreeasciifolderfile-structurereadme

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.