GGfor Tools

Text Chunker

Split long text into character-limited chunks with optional overlap. Preview and download a JSON array for AI prompts or document workflows.

Text Chunker

Split long text into character-limited chunks with optional overlap. Preview and download a JSON array for AI prompts or document workflows.

How to use

Paste text, adjust the options and select Process. Review the editable result, then copy or download it. Editing the input clears the old result.

Supported format and example

Chunk size counts Unicode code points, not tokens or bytes. The splitter prefers paragraph boundaries in the second half of a chunk. Overlap repeats the end of the previous chunk; it must be less than half the chunk size.

A paragraph for your first document.

Another paragraph to split into smaller pieces.

Use Text Chunker to prepare long documents

A text chunker makes a long source easier to process in smaller steps. Split interview transcripts for manual review, prepare sections for separate AI prompts or create sample chunks for a document pipeline. This text splitter preserves source order and returns an array of strings; it does not summarize, embed or rank the content.

Choose chunk size and overlap for your task

Start with 2,000 characters and 200 characters of overlap, then inspect the boundaries. Without paragraph breaks, the first chunk covers positions 1โ€“2,000 and the second begins at 1,801. Set overlap to zero when you need each character only once. Larger overlap repeats more material and increases the total text sent to another system.

Frequently asked questions

Does the chunk size correspond to an AI token limit?

No. This version counts Unicode code points. Token counts depend on the tokenizer and the text, including language and code. Check each chunk with the appropriate token counter and leave room for instructions, conversation history and the expected response.

Why are some chunks shorter than the requested size?

The size is an upper bound. Before reaching it, the splitter may use a blank-line paragraph boundary in the second half of the window. The final chunk contains the remaining text and can also be shorter. There is no padding or invented content.

Does this preserve sentences, code blocks and emoji?

Paragraph preference is not semantic splitting. Long paragraphs may be cut inside sentences or code blocks. A Unicode code point is kept intact, but an emoji formed from several code points or a combining-character sequence can still span two chunks. Inspect boundaries when those structures matter.

How do I use the downloaded JSON chunks?

The file is an ordered JSON array of strings. Parse the array and process one element at a time. Escaped newlines such as \n are JSON notation, not additional source text. If you manually edit the result, keep the JSON syntax valid. Embedding and vector-database import are separate steps.

Related tools