A Markdown/ASCII tree diagram and structure generator. Designed and tested for AI readability. All contained in a simple HTML file for easy local runs.
treeForged is a versatile, browser-based tool that instantly converts your plain text or Markdown outlines into clean, well-structured ASCII tree diagrams. Whether you're planning a new software project, documenting an existing codebase for AI readability, or just organizing your thoughts, treeForged handles the formatting automatically. It runs entirely in your browser with no installation required, ensuring your project structures stay private and secure.
- Multiple Input Methods: Create directory trees using regular indented text (two spaces per pathway) or standard Markdown headers and lists.
- Smart Metadata & Comments: Add
#comments that auto-align in the visual diagram and export as dedicated comment files. - Find & Replace System: Transform file and folder names on the fly with custom rules and quick-access presets (e.g., swapping spaces for underscores).
- Robust Exporting: Download your complete generated structure as a
.ziparchive containing your actual folders and files in formats like.txt,.html, or.md. - Customizable UI & Output: Toggle dark mode, file/folder icons, trailing slashes, root connections, and capitalization to suit your visual preferences.
- A modern web browser (Chrome, Firefox, Safari, Edge, etc.)
- JSZip : Required for exporting
.ziparchives (loaded via CDN automatically).
- Download the scripts (
index.html,script.js,style.css) to your local machine. You can clone the repository or download the latest release. - Ensure they are all placed within the same directory.
- [Optional] If you intend to use the export features completely offline, download the
JSZiplibrary locally and update the<script>source link inindex.html.
When you first run treeForged, you can configure the following settings directly in the interface. All settings are saved to your browser's Local Storage for future use:
- Theme Settings: Toggle Dark Mode, preserve ordering, show trailing folder slashes, and connect roots.
- Display Settings: Toggle folder icons, file icons, and force all-caps text output.
- Format Settings: Configure Find & Replace rules, select your preferred export file format (Text, HTML, Markdown, or Keep Original).
- Sub-setting consideration: You can also toggle whether original inputs, converted outputs, and comments are included in your
.zipexport.
- Sub-setting consideration: You can also toggle whether original inputs, converted outputs, and comments are included in your
To get started, simply type or paste your folder structure into the input area. The app updates the visual tree diagram in real time. Markdown is parsed automatically when typed or pasted.
You can execute the app simply by opening the HTML file in your web browser. No local server or terminal commands are required. MacOS / Linux / Windows: Double-click index.html.
- Plan your project in the input area using a Markdown format with structured headers (e.g.,
# Root,## Folder) and lists (- File.txt). - Adjust your display settings (like toggling Dark Mode or enabling Folder Icons) to visualize the structure clearly.
- Apply any desired Find & Replace rules to quickly format file/folder names (e.g., converting all spaces to dashes).
- Click "Export Files" to download a complete
.ziparchive of your generated structure to your local machine.
- Comment Preservation: Include comments by appending
# your commentto any line. During export, toggle the setting to include comments, and they will be saved as separate_comments.txtfiles inside their respective folders. - Advanced Find & Replace: Use the preset buttons for common transformations (like swapping underscores and dashes), or create unlimited custom rules that apply to all files and folders during export.
- Export button does nothing: Verify your internet connection to ensure the
JSZiplibrary has loaded correctly from the CDN. - Markdown not parsing correctly: Ensure your Markdown file contains headers at the selected level with a proper space after the hash (e.g.,
# Folderinstead of#Folder).
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) . You are free to use, modify, and distribute this software, provided that you:
- Disclose the source code of any modifications you make.
- License your modified versions under the same GPL-3.0 license.
- Preserve the original copyright notices and disclaimers.
See the LICENSE file for the complete text of the GPL-3.0 license.


