Blog

How to Upload Multiple Files to ChatGPT at Once

CeamKrier
TL;DRthe short version
  • Drop the folder on fileconcat.com and you get one text file: the tree first, then every included file in a block labelled with its path.
  • Pasted file contents carry no path labels unless you add them. The whole wrapper, paths and tree together, costs 0.6% to 3.8% of the bundle.
  • The token count is on the result before you paste. A whole public repository is a median 236,218 tokens, and 23 of 60 fit a 128K window.
  • Your files are not uploaded to us. The whole thing runs in your browser.

You have a handful of files that belong together: a few source files, some notes, a config or two.

This guide shows how to upload multiple files to ChatGPT at once, or to Claude, by combining them into one. It covers what the quick approaches cost you and what a labeled bundle looks like. Partway down there is a place to try it on your own files.

01 of 6

Why one paste of everything falls short

When you paste file after file into a chat box, the bytes arrive, but nothing names a file unless you type its name in yourself. The text is one long run of characters with no marker for where math.ts ends and date.ts begins.

What 'one block' means

Pasted text goes into one composer, even when the chat also takes attachments. The task is to turn many files into one block that still says where each file starts, ends, and sits in the tree.

02 of 6

Three ways to combine your files

Here are three ways to do it, and they trade effort against structure.

  1. 1

    Copy and paste by hand

    Manageable for two or three files. Each paste leaves out the file path unless you type it in yourself.

  2. 2

    Concatenate on the command line

    cat src/*.ts joins the files into one. What it will not do is add file headers, skip lock files and build output, or tell you how large the result is.

  3. 3

    Bundle it with FileConcat

    Drop the folder in your browser. The noise gets filtered out, every file is wrapped with its path, and you copy one structured bundle with the token cost shown up front.

The gap between the second and third option is what the rest of this guide is about. Here are the same two files, first as a raw cat dump, then as a simplified labeled bundle (the real one also carries a summary, the tree and each file's language):

cat src/*.ts
export function add(a, b) {
return a + b
}
export function formatDate(d) {
return d.toISOString()
}
project.xml
<file path="src/math.ts">
export function add(a, b) {
return a + b
}
</file>
<file path="src/date.ts">
export function formatDate(d) {
return d.toISOString()
}
</file>

03 of 6

Try it with your own files

Drop a folder or a few files below. It runs entirely in your browser, there is no account, and your files are not uploaded to us. What you get back is one bundle you can copy into ChatGPT or Claude.

Try it with your own files

Drop a folder or a few files. It runs here in your browser, your files are not uploaded to us.

04 of 6

Why the labels matter

The labels are not decoration. A file path says where each file sits: src/math.ts and src/date.ts live side by side under src/. Strip the path labels and only the tree still shows where each file sits.

The tree at the top of the bundle does the same job at a larger scale. It lays out the shape of the project before the first file's contents, the way a file explorer does before you open anything.

They are also cheaper than they look. Measured across five codebases containing 248 files, the entire wrapper (paths, fences and tree together) came to between 0.6% and 3.8% of the bundle. The choice between XML, Markdown and plain labels moved the total by only 0.24% to 1.13%. XML vs Markdown for LLM context has the measurement.

Keep the paths

If you keep only one thing from a raw cat dump, keep the file paths. Each path label names an included file by its full path.

05 of 6

Upload multiple files to ChatGPT as one

ChatGPT's upload-rate limit counts files, not bytes. OpenAI's File Uploads FAQ allows up to 80 files every 3 hours, and 3 a day on the Free plan, and says it may lower these limits at peak hours. Separate per-file size and token limits apply too. A Project holds a set number of files per plan. A bundle is one file however many went into it, so twenty source files and a spec cost one upload and take one Project slot. Every cap by plan: the ChatGPT file upload limit, and for Projects, the ChatGPT Projects page.

06 of 6

How many tokens is that?

The other thing the chat box has is a ceiling: it accepts only so much text at once. So it helps to know the size of a bundle before you paste it, not after it bounces back.

A small folder may fit. A whole repository often does not. We tokenized 60 public repositories end to end, and the median one assembled into 236,218 tokens:

Context windowRepositories that fit
128,00023 of 60
200,00026 of 60
1,000,00043 of 60

So the median repository clears a 1M window and misses a 128K one. The method and the per-language spread are in how many tokens is a codebase.

FileConcat counts tokens live as you build the bundle, so you see that number before you paste rather than after.

The default filter leaves out the parts you almost never want to send: lock files, build output, vendored code, and test files by their ecosystem's naming convention. On a fresh clone the defaults remove a median 22.7% of tokens, about a third of it test files, and a median 73.7% of files survive them. If you need a much smaller bundle, leave out a whole category that does not belong in this question, or add stricter include and ignore patterns.

Tip

Working with a whole repository instead of a loose folder? You can paste a GitHub, GitLab, or Bitbucket URL and bundle it the same way, filtering and token count included. See importing from GitHub.