Skip to main content
Particularly LogoParticular.ly

ASCII Tree Generator

Input Text
Generate ASCII tree diagrams from indented text
Options
Output
src
├── components
│   ├── layout
│   │   ├── sidebar.tsx
│   │   └── header.tsx

│   └── tools
│       └── ascii-art
│           ├── borders.tsx
│           └── dividers.tsx

├── lib
│   └── utils.ts

└── app
    ├── page.tsx
    └── layout.tsx

About the ASCII Tree Generator

The ASCII Tree Generator turns an indented list of folders and files into the classic branching directory tree you see in README files, terminal output, and documentation. It draws the connector glyphs for you — the vertical pipes, the tee branches, and the final corner branch — so every item lines up cleanly no matter how deeply it nests. Instead of hand-typing connector characters and counting spaces, you describe the hierarchy and the tool renders the visualization.

Under the hood the generator parses your input by indentation level, building a parent-child structure, then walks that structure printing the appropriate connector for each node. The last child at any level gets the corner branch while siblings above it get the tee branch, and ancestor levels that still have remaining siblings keep their vertical pipe so the lines never collide. This is the same logic the Unix tree command uses, which is why the output drops cleanly into Markdown code blocks and stays aligned in any monospaced font.

Common uses include documenting a project's folder layout in a README, illustrating a proposed file reorganization in a pull request, sketching an information architecture or sitemap, and explaining package structure in tutorials. Because the result is plain text, it survives copy-paste into GitHub, Slack, Notion, terminal man pages, and email without any rendering dependency.

For the cleanest results, keep your indentation consistent — pick two or four spaces per level and stick with it — and add a trailing slash to folder names so readers can tell directories from files at a glance. If you are documenting code, pair this with the ASCII Banner Generator for a header above the tree, and remember that the visualization is decorative text: it will not stay in sync with a real filesystem, so regenerate it whenever the structure changes.

Frequently asked questions

What characters does the ASCII tree use for branches?
It uses the box-drawing connectors that the Unix tree command popularized: a tee branch for items with siblings below them, a corner branch for the last item in a group, and vertical pipes to carry ancestor lines down through nested levels.
Will the tree render correctly on GitHub and in Markdown?
Yes. Place it inside a fenced code block so it renders in a monospaced font. The connectors are standard Unicode box-drawing characters that display consistently across GitHub, GitLab, Slack, and most editors.
How do I show folders versus files?
Add a trailing slash to folder names (for example src/ or assets/) when you type them. The generator preserves your labels, so the slash is the conventional, readable way to distinguish directories from files.
Does the tree connect to my actual filesystem?
No. It is a text visualization built from the hierarchy you type or paste, not a live scan of your disk. If your real folder structure changes, you regenerate the tree to keep the documentation accurate.