ASCII Tree Generator – turn a folder into a text tree diagram for your README or docs

Turn any folder into a clean text diagram

This free ASCII tree generator turns a directory structure into a text diagram you can paste anywhere. Show readers how a project is organized in a README, sketch a proposed layout in a design doc, or answer a question with an unambiguous picture of the folder hierarchy — no screenshots, no image hosting, and nothing to keep in sync with a drawing tool.

  1. 1. Add your structure

    Upload a folder, paste an existing tree into the Import dialog, or build one by hand — add, rename, and drag files and folders into place.

  2. 2. Filter and style

    Hide clutter with .gitignore-style patterns (node_modules, dist, *.log), then pick the branch characters and indent width that match your docs.

  3. 3. Copy the result

    The ASCII output updates live. Copy it with one click and paste it into a README code block, documentation, or a code comment.

Example output

my-project/
   ├─ public/
   │  └─ favicon.svg
   ├─ src/
   │  ├─ components/
   │  │  └─ Button.tsx
   │  └─ index.ts
   ├─ package.json
   └─ README.md

Frequently asked questions

What is an ASCII tree?

An ASCII tree (also called a directory tree or folder structure diagram) is a plain-text drawing of a folder hierarchy. Characters like ├─, └─ and │ show how files and folders are nested. Because it is just text, it works anywhere code does: README files, documentation, code comments, chat messages, and blog posts.

How do I add a folder structure to my README?

Generate the tree here — upload the folder or build it by hand — then press Copy and paste it into your README inside a fenced code block (a line with three backticks before and after the tree). The code block keeps the monospaced alignment, so the branches line up correctly on GitHub, GitLab, and npm.

How is this different from the tree command?

The tree command prints your real directory exactly as it is: tree /f /a on Windows, or install it with brew install tree (macOS) or apt install tree (Linux). This generator lets you edit the result: filter out build artifacts with .gitignore-style patterns, rename and rearrange entries, change the branch style, and preview the output live. You can also paste the tree command's output into the Import dialog and clean it up here.

Do my files get uploaded to a server?

No. Everything runs in your browser. When you pick a folder, only the file and folder names are read to build the tree — file contents are never touched and nothing is sent anywhere. Your tree is kept in your browser's local storage so it is still there when you come back. Read the privacy page

How do I exclude folders like node_modules from the tree?

Add .gitignore-style patterns in the Ignore patterns box, one per line — for example node_modules, dist, or *.log. Matching files and folders are muted or hidden (your choice) and left out of the generated output.

Can I edit an ASCII tree I already have?

Yes. Click Import and paste any existing tree: output from the tree command, a diagram from a README, or a tree made with another generator. The importer understands the common styles (├──, └──, |--, +--, and plain indentation), rebuilds the folder structure, and lets you edit everything before copying a fresh version.