ScrubMyText · agent context preprocessing

Sanitize untrusted text before it enters an AI-agent workflow.

Retrieved pages, copied documents, emails, tickets, and tool output can contain hidden Unicode, unusual controls, credential-shaped strings, or suspicious instruction patterns. ScrubMyText provides deterministic preprocessing before model ingestion.

The problem

Raw context can contain zero-width characters, bidi controls, unusual Unicode, embedded secrets, or instruction-like text that deserves inspection before being placed into an agent context window.

One-call preprocessing

prepare_for_agent:
inspect → scrub → scan →
detect secrets → redact →
agent-ready text

One prepare_for_agent invocation counts as one API call.

Available controls

Deterministic normalization

Remove selected hidden/control characters and normalize whitespace without paraphrasing or rewriting the source text.

Exact inspection

Report Unicode and control-character positions so software can see what is actually present.

Risk signals

scan_untrusted_text returns structural and heuristic signals. It is not a guarantee that prompt injection or malicious text has been detected.

Secret handling

Detect likely credential patterns and optionally redact common sensitive-data patterns before passing content downstream.

Free entry point: scrub_text and inspect_text can be called without an API key, up to the current public free allowance.

Start with the free API

curl -X POST https://api.scrubmytext.com/v1/scrub   -H "Content-Type: application/json"   -d '{"text":"Hello world","mode":"standard"}'

Common questions

Does ScrubMyText rewrite the user's wording?

The normalization tools are designed to make deterministic character/whitespace changes rather than rewrite prose.

Does the scanner guarantee prompt-injection detection?

No. It surfaces useful structural and heuristic signals; it should be one layer in a broader trust and authorization design.