Fixed-size chunking is the simplest way to split documents for retrieval-augmented generation: every chunk is cut to the same length, measured in characters or tokens, regardless of what the text says. Should you use it in your RAG pipeline? Yes, as a starting point — it is fast, predictable and easy to debug, but it can split sentences and ideas in half, so it suits clean, uniform text far better than structured or mixed documents.
Chunking matters because language models cannot read a whole document library at once. Retrieval systems therefore break documents into pieces, turn each piece into an embedding, and fetch only the pieces that match a question. The way those pieces are cut shapes everything downstream: retrieval accuracy, answer quality and cost.
Key takeaways
- Fixed-size chunking cuts text into equal pieces of a set character or token length, with optional overlap between neighbours.
- It is the fastest and most predictable splitting method, and the easiest baseline to measure other strategies against.
- Its main weakness is cutting mid-sentence or mid-idea, which can dilute embeddings and confuse retrieval.
- Token-based splitting is safer than character-based splitting when you pay per token or work near context limits.
- Use it for uniform, plain text and early prototypes; move to recursive or structure-aware splitting when documents vary.
What is fixed-size chunking?
Fixed-size chunking divides a document into chunks of identical size. If you set a chunk size of 500 tokens, the first 500 tokens become chunk one, the next 500 become chunk two, and so on until the document ends. The splitter does not look for paragraph breaks, headings or sentence ends. It counts, and when the count is reached, it cuts.
The size can be measured in characters or in tokens. Character-based splitting is the simpler of the two: a chunk of 1,000 characters is exactly 1,000 characters long. Token-based splitting measures length with a tokenizer, so a chunk of 512 tokens holds roughly the same amount of meaning regardless of whether the text is dense technical prose or short, punchy sentences.
Most implementations add overlap. With a chunk size of 500 tokens and an overlap of 50, each chunk repeats the last 50 tokens of the previous one. Overlap is a safety net: if an important sentence lands on a boundary, it still appears whole in at least one chunk. A common rule of thumb is to set overlap at roughly 10 to 20 per cent of chunk size, though the right value depends on how much your answers depend on sentences that span boundaries.
How fixed-size chunking works
The process has three steps. First, the document is loaded as plain text, stripping away formatting that the splitter does not need. Second, the splitter walks through the text and slices it at fixed intervals, optionally carrying overlap forward into the next chunk. Third, each chunk is embedded and stored in the vector index alongside metadata such as the source document and the chunk position.
At query time, nothing about this process changes how retrieval works. The retriever compares the question embedding with chunk embeddings and returns the closest matches. The difference fixed-size chunking makes is in what those chunks contain: because boundaries fall wherever the count runs out, a chunk may start mid-sentence, contain the tail of one topic and the head of another, or hold a fragment too small to answer anything on its own.
This is why chunk size is a genuine trade-off rather than a detail. Small chunks, such as 200 to 300 tokens, match questions precisely and keep prompts short, but they can lose the context a good answer needs. Large chunks, such as 1,000 to 2,000 tokens, carry more context but dilute the embedding, so the retriever may rank a chunk highly for one relevant sentence buried among many irrelevant ones.
Fixed-size chunking in practice
In LangChain, fixed-size splitting is available through CharacterTextSplitter and TokenTextSplitter. The character splitter cuts on a separator first, then enforces the size limit, while the token splitter counts tokens directly. A typical starting configuration looks like this:
from langchain_text_splitters import CharacterTextSplitter
splitter = CharacterTextSplitter(
separator="\n\n",
chunk_size=1000,
chunk_overlap=200,
length_function=len,
)
chunks = splitter.split_text(document_text)
That configuration splits on paragraph breaks where possible, keeps chunks near 1,000 characters, and overlaps neighbours by 200 characters. It is a reasonable baseline for plain text, and it takes minutes to set up. In LlamaIndex, the equivalent is TokenTextSplitter, which splits on token counts and accepts the same chunk size and overlap settings.
Before settling on any configuration, run it against real questions from your own users. Build a small test set of twenty to fifty questions with known answers, retrieve the top chunks for each, and check how often the chunk containing the answer appears. This kind of retrieval accuracy check tells you far more than any general guideline, because it measures your documents rather than someone else’s. If the answer-bearing chunk is missing or buried, the splitter is the first thing to question.

Strengths of fixed-size chunking
The strongest argument for fixed-size chunking is predictability. Every chunk costs roughly the same to embed and store, every prompt built from retrieved chunks has a predictable token count, and indexing time scales linearly with document length. There are no surprises in storage or cost, which makes capacity planning straightforward.
It is also the easiest strategy to debug. When retrieval fails, you can look at the exact chunk boundaries and see what went wrong. There is no embedding model deciding where topics change and no parser guessing at document structure, so failures are transparent and reproducible.
Finally, fixed-size chunking is an honest baseline. Every fancier strategy should have to beat it on your own test set before you adopt it. If recursive or semantic splitting does not improve retrieval on your documents, the extra complexity buys nothing.
Weaknesses of fixed-size chunking
The central weakness is boundary blindness. A chunk that ends in the middle of a definition, a list or a table row produces an embedding that mixes two unrelated ideas, and the retriever may match it for the wrong reason or miss it for the right one. Answers built from such chunks can be incomplete or subtly wrong, because the model receives a fragment rather than a whole thought.
Tables, code and lists suffer most. A table split across two chunks loses its headers in one half and its rows in the other, and neither half is useful alone. The same applies to numbered procedures, where step three without steps one and two is ambiguous. If your documents are rich in these structures, fixed-size chunking will quietly degrade answer quality in ways that are hard to spot without targeted testing.
Fixed-size chunking compared with other strategies
The table below compares fixed-size chunking with the main alternatives. Each strategy trades simplicity against respect for document structure, and the right choice follows from what your documents look like.
| Strategy | How it splits | Main strength | Main weakness | Best for |
|---|---|---|---|---|
| Fixed-size chunking | Equal character or token counts | Simple, fast, predictable | Cuts mid-sentence and mid-idea | Uniform plain text, prototypes |
| Recursive chunking | Paragraphs, then sentences, then characters | Respects natural boundaries | More settings to tune | General-purpose documents |
| Semantic chunking | Topic shifts detected by embeddings | Chunks match real topics | Slow and costly to build | Long, varied prose |
| Document-based chunking | Headings, sections and tables | Preserves document structure | Needs reliable parsing | Manuals, reports, contracts |
Best for: uniform plain-text corpora, early prototypes, and any pipeline where predictable cost and simple debugging matter more than squeezing out the last point of retrieval accuracy.
When fixed-size chunking is the right choice
Choose fixed-size chunking when your documents are uniform. Transcripts, chat logs, plain-text articles and generated reports tend to have similar density throughout, so arbitrary boundaries do less damage. It also fits when you are prototyping: the fastest route to a working retrieval system is a fixed-size splitter, a small test set and a measurement loop.
It is also the right choice when cost control dominates. Embedding costs scale with the number of tokens stored, and overlap multiplies that cost directly. A fixed-size configuration with modest overlap gives you an exact token budget before you index a single document.
Consider moving on when your evaluation shows boundary problems, when documents have strong internal structure, or when questions regularly need a whole section rather than a fragment. In those cases, other chunking strategies that respect paragraphs or document structure usually earn their complexity quickly.
Common mistakes with fixed-size chunking
The most common mistake is choosing a chunk size by copying someone else’s number. A size that works for short support articles may fail for dense legal text, because the same 500 tokens can hold one idea or five. Start with a middle value such as 500 tokens, then test smaller and larger sizes against your own questions.
The second mistake is ignoring overlap entirely. Zero overlap is cheaper, but it guarantees that some sentences will be split and lost. A modest overlap of 10 to 20 per cent is usually worth the extra storage.
The third mistake is measuring chunk size in characters while thinking in tokens. Character counts vary with language and formatting: 1,000 characters of English prose is roughly 200 to 250 tokens, but the same count in dense technical text may behave differently. If your costs and context limits are counted in tokens, size your chunks in tokens too. Good document parsing before splitting also matters, because a splitter can only work with the text it is given.
Decision checklist
Use this checklist before committing to fixed-size chunking in production.
- Your documents are mostly uniform plain text without important tables, code or nested structure.
- You have picked a chunk size in tokens, not characters, and tested at least one smaller and one larger value.
- Overlap is set to roughly 10 to 20 per cent of chunk size.
- You have a test set of real questions and you measured retrieval accuracy before and after tuning.
- Chunks fit comfortably inside the context window alongside the prompt, the question and several neighbours.
- You know the total token cost of indexing, including the extra tokens overlap adds.
- You have a plan to revisit the choice when document types change or retrieval quality drops.
Frequently asked questions
What is fixed-size chunking in RAG?
Fixed-size chunking splits documents into pieces of equal length, measured in characters or tokens, so that each piece can be embedded and retrieved separately. It is the simplest chunking strategy and the usual starting point for a retrieval pipeline.
What chunk size should I use for fixed-size chunking?
There is no single correct size. A common starting point is 500 tokens with 50 tokens of overlap, then test smaller and larger values against your own questions. Smaller chunks match questions more precisely; larger chunks carry more context.
Is fixed-size chunking better than recursive chunking?
Neither is better in every case. Recursive chunking usually retrieves better on structured documents because it respects paragraph and sentence boundaries. Fixed-size chunking is simpler, faster and easier to debug, and it can match recursive splitting on uniform plain text.
Should chunk size be measured in characters or tokens?
Tokens are usually the better unit, because embedding models, context windows and API costs are all counted in tokens. Character counts are simpler to reason about but vary with language, formatting and content density.
How much overlap should fixed-size chunks have?
Around 10 to 20 per cent of the chunk size is a practical default. More overlap protects sentences that fall on boundaries but increases storage and embedding cost, since overlapped text is indexed twice.
When should I stop using fixed-size chunking?
Move on when your test set shows answers being lost at chunk boundaries, when documents contain tables, code or deep structure, or when questions need whole sections rather than fragments. That is the point where structure-aware splitting earns its keep.







