Home › Developer Tools › Folder Tree Generator

Folder Tree Generator

Create a clean directory tree like the one the tree command prints, ready to paste into a README, a pull request or documentation. Choose a folder on your computer or type an indented list; only file names are read and nothing is uploaded.

Last updated:

Indent with spaces or tabs, end folder names with /, or paste one path per line (src/app/main.js). Output from the tree command is understood too.

Options
Tree

      
Advertisement
Advertisement

How to use the Folder Tree Generator

  1. Add your structure: type or paste an indented list or a list of paths, or switch to Choose a folder and pick a folder on your computer.
  2. Set ignore patterns such as node_modules, .git or *.log so build output and clutter stay out of the tree.
  3. Pick a style: Unicode lines look best on GitHub, ASCII is safest for plain-text files and terminals.
  4. Fine-tune with a max depth, folders-first sorting, trailing slashes, icons or sizes.
  5. Copy for README to get the tree wrapped in a ```text code block, or download it as a text file.

Input formats the generator understands

The tool detects the format of the text you paste, so you can start from whatever you already have.

FormatExample lineHow it is read
Indented list    components/More indentation than the line above means “inside it”. Tabs count as four spaces; bullets (-, *) are removed.
Pathssrc/api/routes.pyEach line is split on / or \; parent folders are created automatically.
Existing tree│   └── main.jsxBox-drawing and ASCII connectors from tree or tree /A set the level.
Folder markerpublic/A trailing slash marks a folder even when it has nothing listed inside it.
Commentmain.jsx  # entry pointText after #, // or <- (with a space before it) is kept as a comment and aligned.

Ignore pattern cheat sheet

PatternHides
node_modulesAny file or folder named node_modules, at every level
*.logEvery file ending in .log
build/Folders named build (a file called build stays)
docs/draftsOnly the drafts folder directly inside docs at the top level
**/temptemp at any depth (the same as plain temp)
test_?.pytest_a.py, test_1.py and other single-character matches
!keep.logBrings back keep.log after *.log hid it (later rules win)

Tips for readable project trees

  • Show the shape, not every file. A depth of 2 or 3 is usually enough for a README; readers want to know where things live, not every test fixture.
  • Explain the important folders with short comments such as src/ # application code. They are kept and lined up in one column.
  • Hide generated output such as dist, build, coverage, .next and __pycache__, plus lock files if they are not relevant to the reader.
  • Use a code block. Outside a fenced block, Markdown collapses spaces and the lines no longer meet. Copy for README adds the fence for you.
  • Keep it current by pasting the old tree back in, editing it as a list and regenerating.

Frequently asked questions

How do I get a folder tree into my README?

Generate the tree, press Copy for README and paste it into README.md. The tree is wrapped in a fenced code block (```text) so GitHub, GitLab and other Markdown renderers keep the spacing and line characters aligned.

Are my files uploaded when I choose a folder?

No. The browser gives this page the list of file names, paths and sizes inside the folder you pick, and the tree is built in your browser. File contents are never opened and nothing is sent to a server.

Why are empty folders missing when I use Choose a folder?

The standard folder picker only lists files, so a folder with no files inside does not appear. Drag the folder onto the drop box instead: drag and drop reads the folder structure directly and includes empty folders.

How do the ignore patterns work?

They follow .gitignore rules. A name like node_modules matches a file or folder with that name at any level, *.log matches by extension, a trailing slash (build/) matches folders only, a pattern with a slash (docs/drafts) is matched from the top folder, ** matches any number of folders, and ! re-includes something an earlier pattern excluded.

Can I paste the output of the tree command and change it?

Yes. Lines drawn with ├── └── │ or the ASCII form |-- `-- are recognized and rebuilt, so you can paste a tree, then switch the style, sort it, add a depth limit or remove entries with ignore patterns.

What is the difference between the Unicode and ASCII styles?

Unicode uses box-drawing characters (├── └── │) that look like solid lines and match the default output of the Linux tree command. ASCII uses only |, ` and - characters, matching tree --charset=ascii, which is safer for old terminals, code comments and systems without full UTF-8 support.

How do I generate a tree from the command line instead?

On Linux and macOS (after installing it with a package manager) run tree, for example tree -L 2 -I 'node_modules|.git' to limit depth and ignore folders. On Windows, tree /F /A lists files with ASCII characters. Both outputs can be pasted here for cleanup.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

README GeneratorFill in a form and get a polished README.md with badges, install, usage and license, live preview.Gitignore GeneratorBuild a .gitignore from 50+ templates for languages, frameworks, IDEs and OS, merged and deduped.Markdown Table GeneratorBuild Markdown tables in a grid or paste from Excel/CSV, with alignment and preview.Markdown EditorWrite Markdown with a toolbar, live split preview, autosave and .md or HTML export.QR Code GeneratorMake QR codes for links, Wi-Fi, email and more.Barcode GeneratorCreate Code 128, EAN-13, UPC-A, EAN-8, Code 39 and ITF-14 barcodes as PNG or SVG.UUID GeneratorGenerate UUID v4 and v7 / GUIDs in bulk and copy or download them.Schema Markup Generator (JSON-LD)Create JSON-LD structured data for FAQ, Product, Article and more.Htaccess & Nginx Redirect GeneratorBuild 301 redirects for .htaccess, Nginx and Netlify or Cloudflare _redirects.Fake Data GeneratorGenerate mock data as JSON, CSV or SQL.Random String GeneratorGenerate secure random strings and tokens in bulk with any length and character set.API Key GeneratorCreate secure API keys and secrets with prefixes, checksums and SHA-256 hashes for storage.MIME Type LookupFind the MIME type for any file extension, or the extensions for a MIME type, in 400+ entries.Cron Expression GeneratorBuild crontab schedules visually, read them in plain English and see the next run times.URL Slug GeneratorTurn titles into clean, SEO-friendly URL slugs: accents, stop words, separators and bulk lines.JSON Schema GeneratorTurn sample JSON into a draft 2020-12 JSON Schema with types, required fields and formats.License GeneratorCreate a LICENSE file for MIT, Apache, GPL, BSD, ISC, MPL or Unlicense with your name and year.ULID GeneratorGenerate sortable ULIDs and UUID v7 in bulk, monotonic option, and decode their timestamps.Htpasswd GeneratorCreate .htpasswd entries with bcrypt, APR1-MD5 or SHA-1 for Apache and Nginx basic auth.Placeholder Image GeneratorCreate placeholder images in any size, color and text as PNG, JPG, WebP, SVG or data URI.Ads.txt GeneratorCreate or validate ads.txt and app-ads.txt files: seller lines, cert IDs and variables.Docker Run to Compose ConverterConvert docker run commands to docker-compose.yml, or a compose file back to docker run.Dockerfile GeneratorGenerate a production Dockerfile and .dockerignore for Node, Python, Go or a static nginx site.HTML Boilerplate GeneratorTick the options you need and get a clean HTML5 starter template with meta, OG tags and CSS reset.JSON to Zod SchemaInfer a Zod (or Yup) schema from sample JSON with optional, nullable and z.infer types.Linux Commands Cheat SheetSearchable Linux and bash command reference with flags explained, examples and copy buttons.LLMs.txt GeneratorBuild an llms.txt file for AI crawlers: summary and link sections, import from your sitemap.Nano ID GeneratorGenerate secure Nano IDs with custom alphabet, length and count, plus a collision calculator.Nginx Config GeneratorBuild an nginx server block: static site, SPA, reverse proxy or PHP, with SSL, gzip and redirects.OpenAPI / Swagger ViewerView OpenAPI 2/3 JSON or YAML as interactive API docs with validation and an endpoint list.package.json GeneratorFill a form and get a valid, npm-ready package.json with scripts, dependencies and checks.PKCE Code Challenge GeneratorGenerate an OAuth 2.0 PKCE code_verifier and S256 code_challenge, build auth URLs, verify pairs.Regex GeneratorBuild regular expressions visually from blocks or presets (email, date, phone) and test them live.Commit Message GeneratorBuild Conventional Commit messages with type, scope, body, breaking change and issue refs.Database Schema DesignerDesign tables and relationships visually, then export SQL for MySQL, PostgreSQL or SQLite.Docker Compose GeneratorBuild a docker-compose.yml with a form: services, ports, volumes, env, healthchecks and presets.Dummy File GeneratorCreate test files of an exact size in KB, MB or GB with zeros, random bytes or text.FFmpeg Command GeneratorPick a task and options, get the exact ffmpeg command with every flag explained.tsconfig.json GeneratorBuild a tsconfig.json with target, module, strict checks and path aliases, each option explained.Access Log AnalyzerAnalyze Apache and Nginx access logs: top URLs, IPs, status codes, bots and traffic charts.Regex String GeneratorGenerate random test strings that match any regular expression, checked against the real regex.ASCII Table GeneratorTurn CSV or pasted cells into plain-text tables: MySQL, Markdown, Unicode box and reST styles.GitHub Actions Workflow GeneratorBuild a GitHub Actions CI workflow: triggers, matrix, caching, tests, Pages or Docker deploy.Kubernetes YAML GeneratorGenerate Deployment, Service, Ingress, ConfigMap, Secret and HPA manifests with safe defaults.Markdown TOC GeneratorGenerate a linked table of contents from Markdown headings with GitHub-style anchors.OpenAPI EditorEdit OpenAPI/Swagger YAML or JSON side by side with live API docs, validation and download.OpenAPI ValidatorValidate OpenAPI 3.0/3.1 and Swagger 2.0 specs: schema errors, broken $refs, line numbers.Pivot Table MakerBuild pivot tables from CSV or Excel by drag and drop: sum, count, average, charts, export.SQL Query BuilderBuild SELECT queries visually: joins, filters, GROUP BY, ORDER BY and LIMIT, as clean SQL.Truth Table GeneratorType a logic expression and get its full truth table, minterms and canonical DNF/CNF.TypeScript PlaygroundWrite TypeScript with live type checking, see the compiled JavaScript and run it in your browser.Article Schema GeneratorCreate Article, BlogPosting or NewsArticle JSON-LD with headline, authors, dates and images.Event Schema GeneratorCreate Event JSON-LD with dates, venue or online location, tickets, organizer and performers.Google Search Query BuilderBuild advanced Google searches with site:, filetype:, intitle:, exact phrases and date operators.HowTo Schema GeneratorCreate HowTo JSON-LD with steps, tools, supplies, total time and cost, then copy it.Htaccess GeneratorBuild an Apache .htaccess file: HTTPS, www, gzip, caching, error pages, IP blocks, hotlinks.HTML Email Template BuilderDrag and drop blocks to build a responsive, table-based HTML email with inline styles.Organization Schema GeneratorCreate Organization JSON-LD with logo, URL, contact points, address and social profiles.PIN GeneratorGenerate random 4, 6 or 8-digit PINs that avoid sequences, repeats, dates and common PINs.Product Schema GeneratorBuild Product JSON-LD with price, availability, brand, GTIN, ratings and reviews.Question Keyword GeneratorFind the questions people ask about a topic, grouped by who, what, why, how, can and more.Recipe Schema GeneratorCreate Recipe JSON-LD with ingredients, steps, prep and cook times, nutrition and ratings.Security Headers GeneratorPick HSTS, CSP, frame, referrer and permissions options and get Apache, Nginx, Netlify or Cloudflare config.SKU GeneratorBuild consistent SKUs from brand, category, size and color, then export every variant as CSV.Typography Scale GeneratorBuild a modular type scale from a base size and ratio, then copy CSS variables or a Tailwind config.WordPress Salt GeneratorGenerate fresh WordPress security keys and salts for wp-config.php, .env or Docker in one click.ANSI Color Code GeneratorStyle terminal text with 16, 256 or RGB colors and get escape codes for bash, Python, JS and C.Apache Virtual Host GeneratorCreate an Apache VirtualHost config with SSL, redirects, reverse proxy or PHP-FPM in seconds.
See all 85 Code Generators & Builders →