Skip to content
Free browser tool for project documentation

Import a folder, GitHub/GitLab repository, or ZIP. Hide generated files, explain key paths with annotations, and copy the result into your README.

No sign-up or install. Local folders are processed in your browser.

Folder importRepo / ZIP supportAligned annotationsASCII / Markdown export

Live directory tree workspace

Generate an annotated directory tree from your project

Start with the sample or import your own project. Hide an unneeded folder, add a note to an entry point, and preview the result before copying or downloading it.

Loading the live workspace

The directory tree editor runs in your browser so you can try the workflow without creating an account.

Why dir-tree

Make your README project structure easy to follow

A complete file listing can bury the entry points your readers need. Leave out dependencies, build output, and caches. Explain the folders that matter without changing the files on disk.

dir-tree turning noisy tree command output into a clean README project structure with aligned annotations
Hide generated folders, align annotations, and publish a README-ready project structure.

Start from the project you already have

Import a folder, repository, ZIP, or existing tree instead of recreating the hierarchy by hand.

Folder import · Repo URL · ZIP · Remote ZIP · Tree output

Before

README draft
- copied terminal output
- old folder list
- manual cleanup notes

After

my-app/
├── app/              // routes
├── components/       // reusable UI
└── package.json      // dependencies

Keep the relevant files

Use depth limits, ignore rules, and hidden nodes to leave out generated files and focus on the structure you want to explain.

Depth · .gitignore · Exclude rules · Hide nodes

Before

$ tree -L 3
.
├── node_modules/
├── .next/
├── dist/
├── src/
└── package.json

After

my-app/
├── src/              // app code
└── package.json      // dependencies

Explain important paths

Add notes to files and folders, then choose compact inline text or aligned columns. Use manual notes or review optional AI suggestions.

Manual notes · Optional AI · Annotation layouts

Before

├── auth.ts // auth?
├── api.ts        // client
└── format.ts // helper

After

├── auth.ts           // sign-in flow
├── api.ts            // API client
└── format.ts         // text formatting

Export the view you prepared

Copy the output or download Markdown, TXT, or JSON for your README, documentation, or pull request.

Tree style · Markdown · TXT · JSON

Before

Paste raw output
fix spacing
wrap code block
repeat next time

After

Ready to publish
Copy to clipboard
Download Markdown
Download TXT
Export JSON

Workflow

Import, clean, annotate, and export

Bring your project into one workspace, choose what readers should see, and prepare an annotated tree for your documentation.

dir-tree importing a local folder, GitHub or GitLab repository, ZIP file, remote ZIP URL, and tree command output in the browser
Start from a folder, repository, ZIP, remote URL, or existing output.

Import your project

Choose a local folder, GitHub/GitLab repository, ZIP, or existing tree text. You can also start with the sample.

FolderRepo URLZIPRemote ZIPASCII · JSON · XML · HTML · MD
dir-tree cleaning a project directory tree with depth limits, .gitignore rules, exclude patterns, and hidden build folders
Hide noise, adjust depth, and reorder structure without touching source files.

Choose what to show

Limit the depth, apply ignore rules, and hide irrelevant nodes. The original files stay unchanged.

Depth limit.gitignoreHide noiseReorder
dir-tree customizing tree style, aligning annotations, and exporting README-ready ASCII, Markdown, TXT, and JSON
Tune the tree style, align annotations, then copy or download.

Annotate and export

Explain key paths, choose the annotation layout, and copy or download your finished tree.

Tree styleAligned annotationsMarkdown · TXT · JSON · Clipboard
Supported sources and export formats
dir-tree format pipeline importing local folders, GitHub and GitLab repositories, ZIP, tree text, JSON, XML, HTML, and Markdown and exporting Markdown, ASCII TXT, JSON, and clipboard output
Import common project structure sources, including repositories, style one annotated tree, then export for docs.
Local folderRepo URLZIPTree textJSONXMLHTMLMarkdown
Parse + NormalizeStyled annotated tree
MarkdownASCII TXTJSONClipboard

Use cases

Built for README, docs, reviews, and teaching

Give readers the right level of detail, whether they are opening a repository for the first time or reviewing a structural change.

README project structure generated by dir-tree with aligned annotations and consistent tree style
Publish a clear, annotated project structure in README files.

README project structures

Open-source maintainers and template authors

Show entry points, configuration, and key folders without burying them in generated files.

Unicode output
Unicode output
starter-kit/
├── app/                  // routes and layouts
├── components/           // reusable UI
├── lib/                  // shared utilities
└── README.md             // setup guide
Technical documentation page using an annotated directory tree as an architecture map
Turn project structure into an architecture map readers can follow.

Annotated technical docs

Technical writers and developer advocates

Explain the role of routes, models, components, and shared utilities alongside their paths.

ASCII output
ASCII output
api-service/
|-- routes/               // HTTP endpoints
|   |-- auth.ts           // JWT & sessions
|   `-- users.ts          // user CRUD
|-- models/               // DB schemas
`-- middleware/           // request pipeline
Pull request description using an annotated directory tree to explain refactor scope
Explain refactor scope with a compact annotated tree.

Pull request context

Engineers reviewing refactors

Give reviewers a compact map of the structure affected by a refactor.

Unicode output
Unicode output
src/
├── auth/                 // sign-in flow
├── hooks/                // shared hooks
├── utils/                // shared helpers
└── README.md             // structure notes
Folder hierarchy lesson showing visual tree and README-ready ASCII output
Show students both visual hierarchy and exact ASCII output.

Onboarding and teaching

CS instructors and course creators

Help new contributors and students find the files they should explore first.

ASCII output
ASCII output
lesson-01/
|-- starter/              // student begins here
|   `-- index.js          // entry point
`-- solution/             // instructor reference

Guides & examples

Put project structure into practice

Follow focused walkthroughs for turning real projects into clean, annotated README documentation.

Comparison

When to use dir-tree instead of terminal tree

Terminal tree works well for snapshots and scripted workflows. dir-tree brings folder, repository, and ZIP imports together with visual editing, annotation layouts, optional AI suggestions, and document exports.

Terminal tree

Best for: Quick local snapshots

Use command-line filters for focused output; add explanatory notes separately.

tree.nathanfriend.com

Best for: Hand-written ASCII diagrams

Useful for typed diagrams, but it does not read real project folders.

dir-tree

Best for: Documentation-ready project structures

Import, edit, style, annotate, and export from one browser workspace.

When to use dir-tree instead of terminal tree
CapabilityTerminal `tree`tree.nathanfriend.comdir-tree
Reads real local directoriesYesNoYes
Browser-based, no installNoYesYes
Local and remote ZIP supportNoNoYes
GitHub/GitLab repository URLs importNoNoYes
Import existing ASCII / JSON / XML treesOutput onlyLimitedYes
Visual editing and hide nodesNoEdit onlyYes
Tree style customizationManual flags and cleanupBasic visual optionsConnector style, indentation, root path display, metadata, and annotation templates
Annotation column alignmentNoNoYes
Manual and optional AI annotationsNoNoYes
Documentation-ready Markdown / TXT / JSON exportRaw outputGenerated ASCIIStyled and annotated

Privacy boundary

Local processing, clear data boundaries

Work with local folders and ZIPs in your browser. Use remote imports and optional AI when you need them.

01

Generate without uploading project files

Read, edit, and export your local project structure in the browser.

02

Remote imports contact the source

Repository and remote ZIP imports connect to the source you choose.

03

AI annotations are optional

Send selected context when you request suggestions. Review them before applying.

dir-tree privacy boundary showing local browser processing and optional AI annotation without file contents
Local editing and export. Remote sources and AI on request.

Optional AI data flow

  • Directory nodes you selected
  • Existing annotations
  • Generation settings
  • AI provider
  • Suggested annotations

AI uses the context you provide without automatically reading project source files.

FAQ

Directory tree generator FAQ

Import a local folder, GitHub or GitLab repository, ZIP, or existing tree output. Hide generated folders, add annotations, choose Unicode or plain ASCII connectors, then copy the result or export Markdown. Your original files are not changed.

Select or drag a local folder into dir-tree. The browser reads file and folder names and hierarchy locally so you can filter, edit, annotate, and export the structure without uploading file contents.

dir-tree imports local folders, GitHub/GitLab repository URLs, local ZIP files, remote ZIP URLs, `tree` command output, JSON, XML, HTML, and Markdown lists. Each source becomes one editable directory tree.

Project file contents are not uploaded to generate a tree. Local folders, ZIP files, ignore rules, and imported tree text are processed in your browser. Remote imports contact GitHub, GitLab, or the ZIP host. Optional AI annotations send selected paths, node types, existing annotations, settings, and your prompt, not project source files.

The terminal tree command is useful for snapshots, filtering, and scripted workflows. dir-tree adds a browser workspace for importing different sources, editing the displayed structure, writing and aligning annotations, and exporting a version prepared for documentation.

Yes. Add notes to files or folders, then choose inline text or aligned columns. Aligned layouts support Adaptive, Global column, and Per-folder columns. Export preserves the spacing; use a monospaced code block in your README. Mixed-language text and emoji may still appear uneven when the destination font uses different character widths.

Unicode trees use connectors such as `├──` and `└──` for clearer visual structure. Plain ASCII uses basic-character connectors such as `|--` and `+--`, making it suitable for older terminals and restricted text environments. Both styles support annotations, copying, and export.

Yes. Optional AI suggestions use selected paths, existing annotations, generation settings, and your prompt rather than reading your project source files. Review the suggestions before applying them: a file name alone may not explain what the code does. Requests support up to 500 nodes, including files and folders. The current allowance is 10 free requests per IP per day, resetting at 00:00 UTC.

Yes. You can limit visible depth, use `.gitignore`, apply exclude patterns, hide generated folders, collapse folders, and export a focused tree for documentation or review.

Ready to generate your first directory tree?

Open the free browser workspace. No sign-up or install required.

Try dir-tree in your browser