Token & Whitespace Inspector
Show a prompt's token boundaries as a heatmap and flag zero-width, non-breaking and bidirectional control characters that change how a model reads it.
Token & Whitespace Inspector
about 14 tokens, 2 hidden characters
Token heatmap (estimate — tokenizer loading)
2 hidden / risky characters found
- nbsppos 13U+00A0No-Break Space
- zero-widthpos 20U+200BZero Width Space
Bidi controls and zero-width characters can hide instructions or spoof code (the "Trojan Source" class of attacks). Remove them unless you added them intentionally.
Updated . Provided as is. Check the output before you rely on it in production.
How to use Token & Whitespace Inspector
- 1
Paste your prompt
Drop the prompt or text you want to inspect into the input box. The heatmap and stats update as you type.
- 2
Read the token heatmap
Each token gets an alternating background so you can see exactly where the tokenizer splits your text, with a live token count.
- 3
Reveal whitespace
Toggle whitespace markers to turn spaces into middots and surface tabs and newlines, exposing trailing or doubled spacing.
- 4
Reveal hidden characters
Toggle hidden-character highlighting to catch zero-width, non-breaking, and bidi controls, each labeled with its codepoint and name.
- 5
Copy the report
Copy a plain-text summary of character, token, whitespace, and hidden-character counts plus the position of each flagged character.
Questions and answers
What does this tool show?
Which tokenizer does it use?
What hidden characters does it detect?
Why do tokens matter for prompts?
Is my prompt sent to a server?
For AI agents: how to call this tool
Machine-readable contract, endpoints and examples. Humans can ignore this section.
Best Path For Builders
Browser workflow
Runs instantly in the browser with private local processing and copy/export-ready output.
Browser Workflow
This tool is optimized for instant in-browser execution with local data handling. Run it here and copy/export the output directly.
/token-whitespace-inspector/
For automation planning, fetch the canonical contract at /api/tool/token-whitespace-inspector.json.