Tools

Repo to prompt packer

Pack many source files into one LLM-ready document — directory tree plus every file — with token counts per file.

Runs in your browserAI developer tools28.4K
Free
Drop files here

Or choose them. Files are processed in this tab and never uploaded to any server.

Giving a model a whole project works much better when the files arrive as one document with clear boundaries than as a pile of pastes. Select the source files and this tool writes the layout yamadashy/repomix popularised: a short summary, the directory tree, then every file wrapped with its path, in XML tags or Markdown. Dependency folders, lockfiles, minified bundles and binary files are skipped, and each file's size is counted with the o200k_base tokenizer so you can see what will fit in a context window before you paste.

How it works

  • Files are skipped when their path contains node_modules or .git, when they are lockfiles such as pnpm-lock.yaml, when they are minified or source maps, or when they contain a NUL byte or invalid UTF-8.
  • Markdown output fences each file with more backticks than the file itself contains, so a README with code blocks cannot break out of its fence.
  • The packed text can be copied directly or downloaded as repo-prompt.xml or repo-prompt.md, and the list of skipped files is written into the summary.

Where your data goes

Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.

This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.

What it costs

This tool is free, with no sign-in and no points.

Common questions

Can I pick a whole folder?
The file picker here takes multiple files, so select everything inside a folder with Ctrl+A or Cmd+A; files keep their names but not their folder paths. For a real repository with nested directories and a .gitignore to respect, run npx repomix in the project instead, which also offers compression and secret scanning.
How accurate are the token counts?
They are exact for o200k_base, the tokenizer of GPT-4o and later OpenAI models. Claude, Qwen, DeepSeek and Llama use different tokenizers, and code can come out noticeably higher or lower, so treat the numbers as an estimate with a margin when you target a model's limit.
XML or Markdown?
XML tags make file boundaries unambiguous even when a file contains Markdown fences or looks like a heading, and Anthropic's prompting guidance recommends tags for structured input. Markdown reads better for a person and renders in chat interfaces. Both hold the same content.

The open-source behind it

This tool is a self-contained implementation. yamadashy/repomix (MIT) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.

yamadashy/repomix

Also known as

  • repo to prompt
  • repomix online
  • pack code for chatgpt
  • codebase to text
  • code to llm context
  • count tokens codebase