Split Text by Token Limit

Cut long Markdown or prompts into chunks under a maximum token budget, with optional overlap for RAG. Runs locally — no upload.

All processing on this page runs locally in your browser unless noted otherwise.

Samples
Try

Splitting runs locally in your browser. Your text never leaves your device.

Source

Chunks (0)

No chunks yet.

How to use

  1. Paste a long document, load a local file, or click a sample.
  2. Set max tokens per chunk and optional overlap for RAG.
  3. Keep Markdown-aware on to prefer heading/paragraph cuts and avoid breaking code fences.
  4. Copy chunks or export Markdown / CSV / JSON.
  5. Use Try presets (RAG + overlap / Tight chunks / Code-safe) to see typical settings in one click.

FAQ

How do I split a long document?

Open Split by token limit. Set max tokens per chunk. Markdown-aware mode prefers headings and paragraphs and tries not to cut inside fenced code blocks.

How to split documents for RAG with overlap?

On Split by token limit, set Overlap (tokens). Each next chunk starts with the last N tokens of the previous one. Use 0 to disable.

Will chunks always be under the limit for Claude / Gemini?

Only approximately. Estimate models use a proxy tokenizer — leave a safety margin (e.g. 10–15%) if you need headroom for the vendor’s real tokenizer.

Is my prompt uploaded?

No. Token counting runs entirely in your browser. Saving draft text is off by default; if you enable it, drafts stay in localStorage on your device only.

Related tools