Turn a GitHub repo into one text file.
Paste a public repository URL and press Fetch. Lock files, dependencies and build output stay out, and the rest comes back as one file with the file tree at the top, counted in tokens so you know whether it fits your model before you paste it.
- Fetched by your browser, straight from GitHub
- Token count shown before you paste
- No sign-up, nothing uploaded to us
Paste a public link
Drop a cloned folder
For a private repository, or one you have changed.
How many tokens is a GitHub repo?
We bundled 60 public repositories whole with this engine in September 2026. The median came to 236,218 tokens, 23 of 60 fit a 128K window, and the largest reached 5,535,907. There is no typical size to plan around, which is why the count comes before the paste.
Method and every repository: how many tokens a codebase actually is.
- 23 of 60 fit 128K (38%)
- 26 of 60 fit 200K (43%)
- 43 of 60 fit 1M (72%)
What stays out of the file.
On our fresh clones the defaults removed about a fifth of the tokens, most of it tests. Anything here can go back in under Adjust what's included.
| Left out | For example |
|---|---|
| Version control | .git |
| Dependencies and vendored code | node_modules, vendor, third_party |
| Lock files | package-lock.json, Cargo.lock, go.sum |
| Build output | dist, build, target |
| Test files named as tests | api.test.ts, handler_test.go |
Markdown, XML or plain text.
The same single file comes in three styles, switched under the preview. Across five real codebases the switch changed the total by at most about 1% of tokens, so use the one your prompt already uses.
The measurement: XML vs Markdown for LLM context.
Every file under its path
Whatever the style, the file opens with the repository's tree and every file sits under its own path, so the model can tell src/index.ts from test/index.ts.
GitHub repo to text in four steps.
- 1
Paste the repository URL
The whole repository, a branch with /tree/branch, or one folder with /tree/branch/path.
- 2
Press Fetch
Your browser downloads the files straight from GitHub. A large repository comes as one archive, unpacked in this tab.
- 3
Leave out what you do not need
Open Adjust what's included: every file and folder shows its size, and the token count updates as you click rows out.
- 4
Copy or download the one file
Paste it into ChatGPT, Claude or Gemini, or add it to a project, with the count already known.
Common questions.
- How do I convert a GitHub repo to a text file?
- Paste the repository URL at the top of this page and press Fetch. Your browser downloads the files straight from GitHub, leaves out lock files, dependencies, build output and test files by default, and hands back one text file with the file tree at the top and every file under its path. Copy it or download it.
- How many tokens is a GitHub repository?
- It varies more than any average suggests. We bundled 60 public repositories in 10 languages on 2026-09-11: the median came to 236,218 tokens, 23 of 60 fit a 128K context window, and the largest reached 5,535,907. FileConcat counts yours before you paste it.
- Can I convert a private repository?
- Not by link. The import reads public repositories, with no GitHub account. Clone the repository and drop the folder on this page instead; it is read in your browser the same way.
- Can I import one folder or one branch?
- Yes. Add /tree/branch to the URL for a branch, and /tree/branch/path for a single folder, and only the files under that path come in. A branch name with a slash in it does not work, so import the default branch instead.
- What does it leave out by default?
- The .git folder, dependency and vendored directories, lock files such as package-lock.json and go.sum, build output such as dist and target, and test files named as tests, such as api.test.ts or handler_test.go. Any of it can go back in under Adjust what's included. On our fresh clones the defaults removed about a fifth of the tokens, most of it tests.
- Markdown or XML for a codebase?
- FileConcat writes XML, Markdown or plain text, switched under the preview. Across five real codebases the switch changed the total by 0.24% to 1.13% of tokens (our measurement, August 2026), so use the one your prompt already uses.
- Does a large repository work?
- Yes. When GitHub's file listing for a repository comes back incomplete, FileConcat downloads the whole repository as one archive instead and unpacks it in your browser. Without an account, GitHub limits how often one address can call its API, so many imports in a short time can be refused; the message says when to try again.
- Is my code uploaded to a server?
- Not to us. Your browser fetches the files directly from GitHub, so that request goes to them, and the bundle is built in your tab. There is no account to create.
One repository, one file, counted.
URL shapes, rate limits and the archive fallback, in detail: GitHub import.