Skip to content

AI Context Splitter & Redactor

Prepare long text before deliberately sharing it with an AI system. Paste text or load a UTF-8 TXT, Markdown, JSON, or CSV file, scan for configured sensitive patterns, optionally redact detected spans, split the result at paragraph or line boundaries, and download ordered Markdown chunks with a manifest that omits raw matches and the source filename.

0 / 2,000,000

Add text, choose the chunk size, and analyze it to create ordered context files.

How to Use the AI Context Splitter

Paste the text you intend to use or load one supported UTF-8 text file.

Choose a maximum character count for each exported chunk.

Keep redaction enabled when detected patterns should be replaced before export, or deliberately disable it when the exact original text must be retained.

Analyze the context, review the finding categories and limitations, then download the numbered chunks and manifest.

Context preparation workflow

Context preparation workflow
StepActionReview point
1. Add textPaste content or load one supported UTF-8 fileConfirm that the correct source was loaded
2. Choose chunk sizeSet a whole-number character ceiling from 500 to 100,000Leave room for instructions, questions, and model output
3. Choose redactionKeep detected-pattern redaction enabled or deliberately disable itDisabling redaction retains detected values
4. AnalyzeScan, optionally redact, estimate size, and split the outputReview finding categories and stated limitations
5. Export and inspectDownload the ZIP and read the numbered files in orderInspect every chunk before sending it elsewhere

Swipe horizontally to view the full table.

What the Tool Actually Does

The tool performs deterministic browser-side pattern scanning, optional replacement of detected spans, broad token estimation, and character-bounded text splitting.

It does not send the document to an AI model, summarize it, rewrite it, decide what is confidential, or approve it for disclosure.

The output is a preparation aid rather than a safety certification.

What the Scanner Detects

The scanner checks for a defined catalogue of recognizable text patterns. It does not use an AI model, provider API, breach database, or live credential-validation service.

High-confidence findings have a distinctive credential or private-key structure. Medium-confidence findings are more likely to overlap with ordinary text and require closer review.

Provider formats can change. A supported prefix does not prove that a token is active, and an unsupported or encoded secret can be missed.

Configured sensitive-pattern groups

The table summarizes the scanner implementation. Findings are pattern matches, not confirmation that a value is active or sensitive.

Configured sensitive-pattern groups
Pattern groupConfigured matchesConfidence
Private-key blocksPEM-style private keys and PGP private-key blocksHigh
Access credentialsBearer tokens, JWT-style tokens, and credential-bearing connection URLsHigh
Provider credentialsOpenAI-style keys, Stripe secret or restricted keys, GitHub token prefixes, and AWS access key IDsHigh
Named secretsValues assigned to labels such as API key, password, client secret, access token, or secret access keyMedium
Identity and contact dataEmail addresses, possible phone numbers, labelled dates of birth, and valid-format US Social Security numbersMedium
Payment dataLuhn-valid payment-card numbers and labelled expiry or security-code valuesMedium
Network identifiersIPv4 addresses and syntactically valid IPv6 addressesMedium

Swipe horizontally to view the full table.

Why Pattern Scanning Is Only One Review Layer

A deterministic scanner is useful for recognizable formats such as configured credentials and personal-data patterns.

It cannot understand every secret format or the business meaning of ordinary sentences.

A customer name, unreleased price, internal incident, medical detail, or legal strategy can be sensitive without matching a distinctive technical pattern.

Manual review and organizational data-classification rules remain necessary.

How to interpret scanner results

How to interpret scanner results
ResultWhat it meansWhat it does not mean
No findingNo configured pattern matchedThe document contains no sensitive or confidential information
Finding returnedA configured pattern matched a text spanThe match is definitely sensitive or correctly classified
Redacted findingThe detected span was replaced before chunkingThe document is anonymous or resistant to re-identification
Finding limit reachedThe scanner returned 5,000 findings, its configured maximumOnly 5,000 matching spans exist in the source

Swipe horizontally to view the full table.

Redaction Happens Before Chunking

When redaction is enabled, detected spans are replaced before the output is divided.

This prevents one detected value from being divided across two chunk files and ensures that the token estimate describes the exported text rather than the original source.

When redaction is disabled, every detected and undetected value remains in the chunks.

Redaction Is Not Complete De-Identification

Replacing direct identifiers does not necessarily prevent a person, company, project, or event from being inferred from surrounding details.

Dates, locations, job titles, rare events, combinations of attributes, and linked external information can act as quasi-identifiers.

High-risk data sharing may require formal de-identification methods, risk measurement, governance, access controls, or a protected data environment rather than simple pattern replacement.

Prompt Injection Remains in the Prepared Text

Documents, emails, web content, code comments, and retrieved records can contain instructions intended to manipulate an AI model or agent.

Sensitive-pattern redaction does not distinguish ordinary content from malicious instructions.

Treat every imported document as untrusted data, especially when the receiving AI can call tools, access accounts, write files, send messages, or perform external actions.

Use instruction and data separation, least-privilege tools, output validation, approval controls, and additional security testing in the receiving system.

How the Chunker Chooses Boundaries

Each chunk remains at or below the selected character ceiling.

The splitter first looks for a nearby paragraph break, then a line break, then other whitespace within the final portion of the available space.

When no suitable boundary exists, it uses the hard limit.

Windows line-ending pairs and supplementary Unicode code points are kept together.

The Chunks Preserve Reading Order

Numbered filenames determine the intended order.

Joining the chunk contents in filename order reproduces the prepared output exactly.

The splitter does not add headings to the source text, repeat overlap between chunks, remove whitespace, or summarize content.

Users who need overlapping retrieval chunks, semantic embeddings, or recursive document parsing need a different workflow.

Characters Are Not Tokens

AI models process tokens rather than a universal character count.

Token boundaries vary with the model, tokenizer, language, code structure, punctuation, whitespace, and unusual identifiers.

The tool estimates a broad range of approximately one token per five characters through one token per two characters.

Use the target model's tokenizer when an exact count is required.

Character limits and broad token estimates

Character limits and broad token estimates
Maximum charactersBroad token rangePossible useImportant caution
4,000About 800–2,000Small excerpts or narrow tasksDoes not include surrounding prompt instructions or output allowance
12,000About 2,400–6,000General document sections and code reviewExact tokenization varies by content and model
25,000About 5,000–12,500Long chapters or grouped source filesLarge chunks can reduce retrieval and review focus
50,000About 10,000–25,000High-capacity model workflowsA model's advertised context is shared with instructions, history, tools, and output

Swipe horizontally to view the full table.

Choosing a Chunk Size

The correct size depends on the receiving model, existing conversation history, system instructions, attached tools, expected output length, and the task itself.

A model's context limit is not available exclusively to the document. Input instructions, previous messages, tool schemas, retrieved content, and generated output also consume tokens.

Smaller chunks can be easier to inspect and focus, while larger chunks preserve more surrounding context.

Supported Files and Strict UTF-8

The file loader accepts TXT, Markdown, JSON, and CSV files up to 2 MiB.

Files are decoded with fatal UTF-8 validation. Invalid byte sequences stop loading rather than being silently replaced.

The tool does not guess Windows-1252, ISO-8859, UTF-16, or another legacy encoding.

Convert from the known source encoding with a controlled process and keep the original file.

JSON and CSV Are Treated as Text

A JSON or CSV file is loaded as plain text.

The tool does not validate JSON syntax, identify CSV delimiters, preserve spreadsheet column types, or split records semantically.

A hard boundary can occur inside a long JSON value, CSV record, code block, URL, or identifier when no suitable whitespace exists before the limit.

What the ZIP Contains

The ZIP contains numbered Markdown chunks, a JSON manifest, and a README.

The manifest records character counts, chunk filenames and sizes, the selected chunk ceiling, token range, redaction mode, and aggregated finding categories.

It intentionally omits the original filename and raw detected values to avoid adding unnecessary sensitive metadata to the pack.

Downloaded context-pack files

Downloaded context-pack files
FilePurposeSensitive-value handling
context-001.md, context-002.md, …Prepared text in reading orderOnly when undetected or when redaction is disabled
manifest.jsonSettings, character counts, chunk metadata, token range, and finding-category totalsRaw detected values are intentionally omitted
README.mdReading order and manual-review limitationsNo source text

Swipe horizontally to view the full table.

Review the Receiving AI Service

Local preparation does not control what happens after a chunk is uploaded, pasted, synchronized, or sent through an API.

Review the receiving provider's account type, data retention, training controls, regional processing, administrator access, logging, connected tools, and deletion policies.

Use the minimum necessary data for the task and avoid sharing production secrets when a synthetic or reduced example would work.

Recommended Pre-Share Review

A useful review separates technical pattern detection from authorization, data classification, prompt-injection risk, and provider controls.

The tool assists with only part of that process.

Pre-share review checklist

Pre-share review checklist
CheckQuestionTool coverage
AuthorizationAre you permitted to share this material with the selected provider and account?Not determined
SecretsAre API keys, passwords, tokens, private keys, or session values present?Configured patterns only
Personal informationCan a person be identified directly or through surrounding details?Configured patterns only
Business sensitivityDoes ordinary language reveal internal plans, prices, customers, incidents, or strategy?Not understood semantically
Prompt injectionDoes imported content contain instructions that an AI system could treat as commands?Not neutralized
Provider controlsAre retention, training, access, region, and workspace policies acceptable?Must be checked separately

Swipe horizontally to view the full table.

Privacy and Local Processing

Text loading, pattern detection, redaction, splitting, token-range estimation, manifest creation, and ZIP compression run in the browser.

The implementation does not make an AI-model request or upload the source to an Olivez server.

Files are generated only after the download action is selected.

Chunk and Token-Range Rules

The exported text is split after optional redaction. Token values are broad planning estimates rather than model-specific counts.

Formula variables

Original source text
Text after optional detected-pattern redaction
Exported chunk i
Selected maximum characters per chunk
Prepared output character count
Lower planning estimate for tokens
Upper planning estimate for tokens
Maximum chunk length
Prepared-text preservation
Lower token estimate
Upper token estimate

Examples

Prepare a support log

1

Input

A 40,000-character support log containing email addresses, a detected access token, stack traces, and several troubleshooting sections.

Show result

Result

Detected spans are optionally replaced, the prepared text is split into ordered chunks, and the manifest records category counts without copying the raw findings.

Customer identity and confidential incident details still require manual review.

Split a long Markdown document

2

Input

72,000 characters with a 12,000-character ceiling.

Show result

Result

Several numbered Markdown chunks created near paragraph, line, or whitespace boundaries.

The exact chunk count can exceed a simple division because preferred natural boundaries may be earlier than the hard limit.

Retain original values deliberately

3

Input

Redaction disabled for a controlled internal workflow.

Show result

Result

The chunks preserve detected values and the manifest records that redaction was disabled.

The exported pack should be handled with the same protection as the source.

No configured pattern found

4

Input

An internal strategy document written entirely in ordinary prose.

Show result

Result

Zero findings may be returned even though the document remains confidential.

Pattern scanning does not understand business sensitivity.

Indirect prompt injection remains

5

Input

A loaded document contains instructions telling an AI agent to ignore its task and send data elsewhere.

Show result

Result

The instructions remain unless they independently match a configured sensitive-data pattern.

The receiving AI system needs prompt-injection defenses and restricted tool permissions.

Reject invalid UTF-8

6

Input

A legacy-encoded file is loaded as UTF-8.

Show result

Result

Loading stops before scanning or chunking.

Convert from the known source encoding while retaining the original.

Frequently Asked Questions

Does this tool send my text to an AI model?

No. The supplied implementation performs deterministic scanning, optional redaction, splitting, estimation, and ZIP generation locally in the browser.

Does no finding mean the text is safe to share?

No. It means only that no configured pattern matched.

Does redaction make a document anonymous?

No. Surrounding facts and combinations of attributes can still identify a person, organization, project, or event.

What does the scanner detect?

It checks for configured private-key blocks, bearer and JWT-style tokens, credential-bearing URLs, OpenAI, Stripe, GitHub, and AWS-style credentials, likely named secrets, email addresses, possible phone numbers, labelled birth dates, valid-format US Social Security numbers, possible payment-card details, and IP addresses.

Can the scanner miss secrets?

Yes. Unknown formats, encoded values, fragmented credentials, ordinary-language secrets, and unsupported patterns can be missed.

Can a finding be a false positive?

Yes. A value can resemble a credential or personal-data pattern without actually being sensitive.

Why is redaction enabled by default?

It reduces accidental retention of configured detected values in exported chunks, while still requiring manual review.

What happens when redaction is disabled?

The original detected values remain in the chunks and the manifest records that redaction was disabled.

Can it detect prompt injection?

It is not a prompt-injection detector. Malicious or irrelevant instructions can remain in the prepared text.

Does splitting summarize or rewrite my text?

No. The prepared text is divided without summarization, translation, reordering, or overlap.

Can a chunk be smaller than the selected size?

Yes. The splitter can end earlier at a nearby paragraph, line, or whitespace boundary.

Can a chunk exceed the selected size?

No. Every exported chunk remains at or below the selected character ceiling.

Why use characters instead of tokens?

Character splitting is deterministic and model-independent. Exact tokens require the tokenizer for the target model.

Is the token estimate exact for ChatGPT or an API model?

No. It is a broad character-based range and does not run a model-specific tokenizer.

How should I choose the chunk size?

Allow room for system instructions, conversation history, tools, your question, and expected output rather than using the model's entire context limit for source text.

Can I load JSON and CSV files?

Yes, but they are treated as raw text rather than parsed data structures.

Why must loaded files be UTF-8?

Strict decoding prevents an incorrect guess from silently replacing characters before scanning and export.

What is included in the manifest?

It includes settings, character counts, chunk filenames and sizes, token range, redaction mode, and aggregated finding categories.

Does the manifest contain detected secrets?

It intentionally omits raw detected values and records only category-level summaries.

Why does the result stop at 5,000 findings?

The scanner returns at most 5,000 non-overlapping findings. When that limit is reached, additional matching spans may remain in the source.

Does local processing mean the finished pack is private everywhere?

No. Local processing protects the preparation step only. Privacy after export depends on where the files are stored or sent.

Should I share production API keys after redacting other values?

No. Production secrets should be removed and managed through an appropriate secrets-management system rather than placed in AI context.