Folder to Text Converter: Convert a Local Directory to One Text File (No Upload)

A folder to text converter combines every file in a local directory into a single text file, usually for pasting into an LLM. The fastest safe option is a browser-based tool: Repo2Txt's local folder to text converter reads your folder directly in the browser, processes everything client-side, and uploads nothing to any server.

That last part is the one developers ask about most, so let me say it plainly: in Repo2Txt's local mode, your files never leave your machine. The conversion runs in your browser's memory using the File System Access API. There's no account, no server-side processing, and nothing to delete afterward because nothing was stored.

I built it that way because I wasn't willing to paste client code into a random website either. Here's how it works and when a script beats it.

 

How does a browser convert a folder to text with no upload?

Modern browsers can read local directories directly through the File System Access API, which Chrome and Edge have shipped since 2020 (Chrome 86, per Google's web.dev documentation). When you pick a folder, the browser requests read permission, and the page's JavaScript walks the local directory tree.

Repo2Txt uses exactly this. The file tree you see, the token counts, and the final combined text file are all computed in your browser tab. Open your browser's network inspector while converting, and you'll see no file contents in any request. That's the verifiable version of the privacy claim, and I encourage skeptical developers to check.

The trade-off is browser support: the API works in Chrome, Edge, and other Chromium browsers. Firefox and Safari don't fully support directory access, so you'd fall back to selecting a zip file instead. Repo2Txt accepts those, too, and processes them the same way on the client side.

 

How to convert all files in a folder to one text file (step by step)

  1. Open repo2txt.com/local in Chrome or Edge and click to select your folder. The browser shows a permission prompt: read access only.

  2. Review the checkbox file tree. Every file and subdirectory shows up before anything is converted. Nothing is combined blindly.

  3. Deselect the junk. node_modules/, venv/, .git/, lockfiles, dist/, and binary assets. For local folders, this matters even more than for GitHub repos, because dependency folders actually sit on disk, a stock Next.js project's node_modules/ alone can run past 2 million tokens.

  4. Watch the live token count as you select. Aim under your model's limit: 200,000 tokens for Claude's default context window per Anthropic's documentation, 1 million for GPT-4.1 and Gemini 2.5 Pro per OpenAI's and Google's docs.

  5. Generate, then copy or download. The output is one text file: directory tree at the top, then each file's contents under a === path === header, ready for any LLM.

On a 168-file project I tested, the entire flow took under 2 minutes, and most of that time was spent deciding which test fixtures to keep.

 

Folder to text converter vs. desktop scripts: which should you use?

The classic alternative is a shell one-liner or Python script. I've used both for years; here's the honest comparison:

 

Browser tool (Repo2Txt local)

Shell/Python script

CLI tool (Repomix)

Install required

None

None (built-in)

Node + npm

Privacy

Client-side, no upload

Fully local

Fully local

File selection

Visual checkbox tree

Edit the command

Config file globs

Token counting

Live, per selection

DIY

In summary output

Binary file handling

Automatic skip

Manual excludes

Automatic

Repeatability

Manual each time

Scriptable

Scriptable, CI-ready

Works on locked-down machines

Yes

Usually

Often blocked

The script version, for reference:

find . -type f \( -name "*.py" -o -name "*.md" \) \
  -not -path "./venv/*" -not -path "./.git/*" \
  -exec sh -c 'echo "=== $1 ==="; cat "$1"' _ {} \; > project.txt

Scripts and CLIs win on repeatability — if you convert the same folder every day, a committed Repomix config beats clicking checkboxes. The browser tool wins when you want to see what you're including before you include it, when you're on a work machine where you can't install npm packages, or when the folder is a one-off (a client handover, a legacy project, a zip someone emailed you).

All three options keep your code local. The one approach I'd avoid for proprietary code is any converter that uploads your folder to a server for processing. There are several, and with client code, that's a conversation you don't need to have with your security team.

 

Is it safe to convert code folders online?

It depends entirely on where the processing happens, so check before you pick a tool. Three things I'd verify for any converter, including mine:

Where files are processed. Client-side (in-browser) means your code stays on your machine. Server-side means your code is transmitted, processed, and possibly logged on the server. Repo2Txt's local mode is fully client-side; the network tab proves it.

What permissions are requested? The File System Access API requests read access to a folder you choose, not your entire disk. If a web tool wants an account or an OAuth grant just to convert a folder, that's more access than the job requires.

What happens to the output? The combined text file should land in your clipboard or downloads folder, not in the tool's cloud storage.

Worth remembering: the conversion step is only half the privacy story. Once you paste the output into an LLM, that provider's data policy applies. For sensitive code, check whether your ChatGPT, Claude, or Gemini plan trains on your inputs; most enterprise and API tiers don't, most free consumer tiers have settings to review.

 

What can you do with a folder converted to text?

The obvious use is pasting a project into an LLM for review, debugging, or "explain this codebase", full context in one prompt catches cross-file issues that pasting individual files misses. If your project lives on GitHub instead of a local folder, the GitHub repo to text converter does the same job from a URL.

Less obvious uses I've seen from actual users: generating a plain-text snapshot of a project for documentation or compliance archives, prepping a codebase handover for a contractor, feeding clean structured text into a RAG pipeline (the === path === headers make chunk provenance trivial, and turning a folder of markdown notes into one file for a writing assistant.

 

FAQ

How do I convert a folder to a text file online for free?

Open Repo2Txt's local mode in Chrome or Edge, select the folder, uncheck files you don't want in the checkbox tree, and generate. The result is a single text file containing the directory tree and the contents of every file. It's free, requires no account or installation, and processes files entirely in your browser without uploading them.

Is there a local directory to text converter with no upload?

Yes. Repo2Txt's local mode uses the browser's File System Access API to read your directory client-side, so no file contents are ever sent to a server. You can verify this in your browser's network inspector during conversion. CLI tools like Repomix and plain shell scripts are also fully local alternatives.

Is it safe to convert code folders online?

It's safe when processing is client-side, meaning the conversion runs in your browser and files never leave your machine. Repo2Txt's local mode works this way. It's riskier with tools that upload folders to a server for processing, since your code is transmitted and possibly retained. Check the tool's architecture, and verify with the network tab if in doubt.

How do I convert all files in a folder to one text file on Windows or Mac?

The no-install route is a browser tool: select the folder at repo2txt.com/local, deselect junk, download the combined file; it works identically on Windows, Mac, and Linux in Chrome or Edge. The script route is find piped to cat on Mac/Linux or Get-ChildItem | Get-Content In PowerShell, though, you'll handle binary files and exclusions yourself.

Why exclude node_modules when converting a folder to text?

Dependency folders dwarf your actual code. A stock Next.js install node_modules/ can exceed 2 million tokens, ten times Claude's entire 200K context window, while contributing nothing an LLM needs, since models already know the public libraries. Excluding it, along with lockfiles and build output, typically cuts a conversion by 5x or more.

Does a folder-to-text converter work with zip files?

Repo2Txt accepts zip files and processes them the same way on the client side, which is a workaround for Firefox and Safari, where the File System Access API isn't fully supported. Zip a project someone sent you, drop it in, and you get the same checkbox tree, token counts, and combined output without having to extract anything manually.