Toolvito

Processed online by Toolvito

Document Chunker

Split long documents into small, self-contained pieces for search, question answering (RAG) or a vector database. Each chunk keeps its heading, source file and page numbers.

Split documents into chunks

Split documents into chunks

Markdown headings (#, ##) are used as sections.

Or drop files here. TXT, MD, MARKDOWN, HTML, HTM, XHTML, DOCX, ODT, EPUB or PDF, up to 20 files, 100 MB each at most.

    In the unit below. 200–500 tokens suits most search uses.

    How much of the end of a chunk is repeated at the start of the next one (whole sentences). Not used when splitting by meaning.

    Files to make

    More options

    1 = only main headings, 2 = also sub-headings, 0 = ignore headings.

    When you run a task here, Toolvito receives the information you submit for processing. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to split a document

    1. Choose your files (PDF, Word, Markdown, HTML, OpenDocument, EPUB or text), up to 20 at once, or paste the text.
    2. Choose how to split: By headings and paragraphs (best for structured documents), Fixed size windows, or Where the meaning changes.
    3. Set the chunk size and the overlap. Sizes are counted in real tokens of the MiniLM tokenizer, in words or in characters.
    4. Press Split into chunks and download JSONL, JSON, CSV or Markdown.

    What each chunk has

    • A stable id (file name and number), the source file, the heading path (for example “Guide > Borrowing > Late returns”), the page numbers of a PDF, the text and its size.
    • The heading can be written at the start of the chunk text, so each chunk still makes sense on its own.
    • Optional sentence vectors (384 numbers) from all-MiniLM-L6-v2 or the multilingual MiniLM, ready for a vector database. The model name is written in every chunk.

    Good to know

    • Headings come from the file: Markdown #, HTML h1–h6, Word heading styles. PDFs have no headings, so they are split by paragraphs and pages.
    • Scanned PDF pages are read with OCR (English).
    • Token counts are for the MiniLM tokenizers. Other models (for example OpenAI or Llama models) count tokens differently; leave some room, or count words.
    • To count tokens for a prompt, use the Token Counter.

    Related tools