Directory Tree Generator
Sketch a project's files and folders, then generate the connecting branches for your README. Type an outline or paste relative paths instead of uploading a folder or sharing access to your file system.
ASCII or Unicode branches. No account needed.
Your directory tree
21 columns, 8 entries
project/ |-- src/ | |-- main.ts | `-- utils/ | `-- format.ts |-- tests/ | `-- main.test.ts `-- README.md
Keep a monospace font and wrapping off. The tree preserves your order. It does not inspect your files. Copy as Markdown adds a code fence for a README.
Make a README tree from Git-tracked files
With Git installed, run this read-only command from your repository's root in PowerShell or a terminal. It lists tracked paths under src and tests, plus README.md. Replace those names with the files or folders you want to describe; it does not read their contents or send them to this site.
git ls-files --cached --deduplicate -- README.md src testsThis fictional project produces the four paths below. Git lists README.md first here; the generator keeps that order, rather than sorting folders ahead of files.
README.md src/main.ts src/utils/format.ts tests/main.test.ts
- Review the names locally and remove anything you should not share. Tracked files can include secrets or files now covered by .gitignore; this command is not a privacy filter.
- Choose Relative paths in the generator above, paste only the path lines, keep ASCII branches and select Generate tree. Do not paste your shell prompt or the command.
- Choose Copy as Markdown. Paste the fenced tree below a README heading and add a description of the structure, as in this complete example.
## Project structure
```text
project/
|-- README.md
|-- src/
| |-- main.ts
| `-- utils/
| `-- format.ts
`-- tests/
`-- main.test.ts
```
The source entry point is src/main.ts. Shared formatting code is in
src/utils/format.ts. Entry-point tests are in tests/main.test.ts.The tree has 8 entries including the added project/ root, with a widest row of 21 characters. Preview your README before committing it. The text description explains the structure without requiring readers to interpret branch symbols. For literal TXT display, use the safe shell display example.
Git's ls-files documentation defines this as an index listing: newly staged files appear even before a commit, untracked files do not, and an unstaged deletion can still appear. Empty folders are not tracked; add a line such as docs/ manually if needed. Narrow the selection for larger projects so inferred folders and the root still fit the 100-entry limit. If Git prints quoted or escaped names, or your names contain Unicode, do not remove quotes and assume they are decoded. Use a supported outline with suitable display names instead; this tool does not import arbitrary Git filenames.
Turn a list of paths into a tree
Already have file paths? Choose Relative paths, replace the input with this list and select Generate tree. It produces the same eight-entry project as the outline example below, without typing indentation or parent folders.
src/main.ts src/utils/format.ts tests/main.test.ts README.md
The tool adds a project/ root. Paths are relative to that root: src/main.ts goes inside src/, not inside another project/ folder. Use forward slashes or backslashes as separators. To include an empty folder, put a separator at the end, such as docs/. Choose Copy as Markdown to paste the result into a README code block.
Parents are created as needed, in first-seen sibling order. Repeated paths are merged; names are case-sensitive. A file and folder cannot share a name in the same parent. Use unquoted, printable ASCII paths without drive letters, leading slashes, . or .. segments, blank segments or spaces at either end of a name. Quoted Git names and escape sequences are not decoded. Up to 100 input paths are allowed, but the resulting tree must still fit the 100-entry limit, including inferred folders and the added root.
Describe a small project in your README
This fictional project has a source folder, nested utilities, a test folder and a README. The outline below is the exact input used for the initial result. The root has no indentation; src/ has two spaces, main.ts has four and format.ts has six.
project/
src/
main.ts
utils/
format.ts
tests/
main.test.ts
README.mdKeep ASCII branches selected and generate. Copy as Markdown adds a code fence so spaces survive in a README. The vertical pipe continues while a folder has a later sibling; the backtick marks the last child. The result contains eight entries. Switch to Unicode and generate again for box-drawing branches. Neither option changes the names or order.
Indented outline rules
Start with exactly one unindented folder ending in /. Add one entry per line and exactly two spaces for each level below it. A child must follow its parent; do not skip a level. Every folder that contains children must end in /. Use names, not full paths or existing tree output. Slashes are allowed only at the end of folder names; backslashes, . and .. are rejected.
Names are case-sensitive and must be unique within the same folder, including when one name ends in /. The same name in different folders is allowed. Internal spaces are preserved; trailing spaces and blank lines are errors. Windows CRLF becomes LF and one final newline is accepted. Tabs, Unicode names and other controls are not supported.
Limits: 8,000 input characters, 100 entries including the root, eight levels below the root and 60 characters per name including /. Nothing is silently sorted, trimmed, wrapped or truncated. A folder can be empty. Neither input format validates or scans your filesystem.
Share the structure, not just the symbols
Text and TXT exports contain the visible result with LF line breaks and no final newline. A Markdown fence preserves spacing but does not make the diagram an accessible nested list. For this example, explain that src contains main.ts and utils/format.ts, tests contains main.test.ts, and README.md sits at the root. Use a semantic nested list for a structured alternative. Unicode branches need a font and destination that support box-drawing glyphs; ASCII avoids that requirement. To display the TXT file in a terminal without interpreting its backticks or pipes as commands, follow the safe shell display lesson. For a destination that breaks spacing, paste the ASCII result into ASCII to PNG and keep the description alongside the image.
For a window layout rather than a project outline, use the terminal mockup builder. For rows and columns, use the ASCII table generator.
Formatting runs in your browser. This tool does not save names or put the outline in links. Export before leaving. Site analytics, storage and hosting are separate. See the README and CLI examples for related workflows.