Folder Tree Generator
Pick a folder or paste paths, skip what .gitignore skips, and get a tree for your docs.
Free preview.
- Free preview: the first lines of the tree (up to 20), with the folder, file and size totals of the whole tree.
- Locked until you unlock it: download and copy.
- Unlock: Pro pass, ₹179 for 30 days, a one-time payment that never renews.
Ways to unlock shows how to get the full result.
Printing this result is locked in the free preview.
1. Your folder or paths
or drag a folder here
Read on your device: only names and sizes, and nothing is uploaded. Leave out big folders such as node_modules/ below to keep it quick.
One path per line (folders may end with /), the output of tree or tree /F, or a Markdown or indented list. Text after # becomes a comment beside the name.
2. What to show
Your tree
Left out
Locked in the free preview. Opens the ways to unlock this result.
Locked in the free preview. Batch runs unlock with a pass.
Locked in the free preview. Query results unlock with a pass.
About the Folder Tree Generator
Pick a project folder and get a text tree of it for a README, a pull request or the docs, like the tree command but without installing anything. The folder is read by your browser: the names and sizes come from your own disk and nothing is uploaded. You can also paste a list of paths (from git ls-files, find or dir /s /b), the output of tree or tree /F, or a Markdown list, and restyle it.
Leave out what does not belong in the docs with .gitignore patterns such as node_modules/, dist/ or *.log. For a folder you pick, the project’s own .gitignore files are applied the way git applies them: the deepest file decides, and nothing inside an ignored folder comes back. Limit the depth, show file and folder sizes, add comments that line up in one column, and choose a Unicode tree (├──), plain ASCII (|--) for any font, an indented list or a Markdown list.
How to use it
- Choose Folder and press Choose a folder (or drag a folder onto the box), or choose Paste and paste paths, a tree or a Markdown list. Load sample shows what can be pasted.
- Under What to show, list what to leave out, one pattern per line in .gitignore syntax; the box starts with
node_modules/. Keep Use the folder’s .gitignore files ticked to apply the project’s own rules. - Pick a Style, a Depth and Sizes, and set the root name. The tree updates as you change them, and Left out lists what was left out and which rule did it.
- With a pass, or once this tree is unlocked, use Copy or Download (
.txt, or.mdwith Code block ticked or the Markdown style); the free preview shows the first lines and locks both.
Examples
src/index.ts # entry point src/routes/home.ts src/routes/about.ts public/ README.md # start here package.json
. ├── public/ ├── src/ │ ├── routes/ │ │ ├── about.ts │ │ └── home.ts │ └── index.ts # entry point ├── package.json └── README.md # start here
Folders come first and names sort naturally (file2 before file10). public/ ends with a slash, so it is a folder even with nothing under it.
my-app ├── src │ └── main.go └── go.mod 1 directory, 2 files
- `my-app/`
- `src/`
- `main.go`
- `go.mod`Names go in code spans, so __init__.py or *.md are not read as Markdown emphasis. GitHub and most editors show nested lists without a code block.
Patterns: node_modules/, *.log, !important.log Paths: app.log, important.log, node_modules/react/index.js, src/app.js
. ├── src/ │ └── app.js └── important.log
Left out shows node_modules: your pattern “node_modules/” (line 1) and app.log: your pattern “.log” (line 2)*; !important.log brings that one file back.
What you can paste
- Paths, one per line:
src/app.js. Folders may end with/;\works as on Windows; absolute paths (/home/me/shop/…,C:\work\shop\…) are trimmed to the folder they share, which becomes the root. Names that git prints in quotes because of accents or other scripts ("docs/caf\303\251.md") are read as the real names. - Tree output from Linux and macOS
tree(Unicode, or ASCII with--charset ascii; sizes from-hor-sand the targets of symbolic links are dropped) and from Windowstree /F, with or without/Aand in any Windows language. - Outlines: a Markdown list or an indented list, such as this page’s own Markdown and indented styles.
- Comments: text after
#on a line (README.md # start here) is shown beside the name, lined up in one column; in the Markdown style it follows a dash.
How the ignore rules work
The patterns use .gitignore syntax: build/ leaves out folders called build, *.log matches at any depth, /dist only at the root, docs/**/*.pdf inside docs, and !keep.log brings something back. They are matched the way git matches them — the same code as the .gitignore Generator, where you can test a single path.
- Patterns typed here win over the folder’s .gitignore files, like
git ls-files --exclude. - Each .gitignore applies to its own folder and everything below it; the deepest one that matches decides.
- An ignored folder hides everything inside it, so a
!rule cannot bring back a file from inside it. Ignore the folder’s contents (logs/*) and then re-include (!logs/keep.txt). .gitis never shown. Names that start with a dot are left out unless Show hidden files is ticked.
Reading a folder in your browser
In Chrome, Edge and Opera on a computer the page uses the folder picker in read mode, which opens only the folders it needs: an ignored node_modules is never read, so even large projects are quick. Firefox, Safari and phone browsers use their own folder chooser, which hands over every file of the folder at once, and lists files only, so empty folders do not appear there; a phone browser that cannot choose a folder lets you pick files instead, and they are listed under one root. Dragging a folder onto the box works too.
Some browsers word their prompt as an “upload”. That is their standard wording for letting a page see a folder: here the names and sizes stay on your device, and the page has no way to change your files.
Limitations
- Up to 50,000 entries are read and 20,000 lines written. Leave out large folders (dependencies, build output) to stay well below that.
- Sizes need a folder you pick; a pasted list has none. A folder’s size is the total of the files shown under it after ignoring, not the space it takes on disk.
- In a pasted list, a folder with nothing under it shows as a file unless it ends with
/. - Comments come from pasted text. To comment a tree of a picked folder, paste its paths or tree with your comments added.
- Names that contain a line break, or a
#after a space at the end of a line, cannot be pasted as they are.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What do I get without a pass?
Without a pass, Folder Tree Generator shows the first lines of the tree (up to 20), with the folder, file and size totals of the whole tree. Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.
How do I list a folder from the command line instead?
On Linux and macOS, tree prints a tree (tree -L 2 -I "node_modules|dist" limits the depth and leaves out folders; -a shows hidden files). On Windows, tree /F shows files as well as folders and tree /F /A draws with ASCII characters. In a git repository, git ls-files lists the tracked files; paste any of these outputs here to restyle it, add comments or turn it into Markdown.
Is my folder uploaded?
No. Your browser reads the names and sizes on your device and the page never sends them anywhere. The folder picker only lets the page read: it cannot change, move or delete anything.
Why are files my .gitignore leaves out still in the tree?
The .gitignore files are read only from a folder you pick, and only while Use the folder’s .gitignore files is ticked. A pasted list has no .gitignore with it: paste the patterns into the Leave out box instead. Global excludes and .git/info/exclude are not read either.
Which style should I use in a README?
The Markdown style is a nested list that GitHub, GitLab and most editors show as it is. The Unicode style looks best in a code block: tick Code block to wrap it in ```text fences. Use ASCII where a font lacks the box-drawing characters, for example in some terminals and plain-text emails.
Can I add notes next to files and folders?
Yes, in pasted text: put # your note after a path or a tree line (with a space before the #). Notes line up in one column in the tree styles and follow a dash in the Markdown style. Untick Show comments to leave them out.