AI Unicode Jailbreak Lab: Hidden Characters the Filter Can't See

✨ AI Summary
FilterBot blocks extraction keywords like 'reveal' and 'secret' — but it checks ASCII text. Break the words up with invisible or look-alike Unicode and the filter sees no match, while the model tokenises right across the gaps and reads your meaning.
Lab at a glance: Intermediate · 100 XP · about 15 minutes · runs in your browser, no signup or setup. Try it yourself first; the full solution is behind a spoiler below.

What this lab teaches

Unicode jailbreaks exploit a normalisation gap: the filter compares raw bytes, but the model reads tokens and shrugs off zero-width characters, homoglyphs and combining marks. A banned word peppered with invisible characters is no longer a byte match, yet still perfectly readable to the model.

The lesson: if the filter and the model normalise text differently, the space between them is a bypass.

How FilterBot checks input

FilterBot matches banned keywords as ASCII. Inserting zero-width characters (or look-alike glyphs) into those words defeats the match, but the model tokenises across them and understands the request unchanged.

The attack approach

  • Confirm the filter matches ASCII keywords exactly.
  • Insert invisible or look-alike Unicode into the banned words.
  • Keep the text readable to the model despite the inserted characters.
  • Send it so the filter finds no match and the model reads the intent.

Full walkthrough (spoiler)

If it is still blocked, the filter normalised that trick — try another and open the steps.

Show the step-by-step solution
  1. Take the request containing a banned keyword and break the keyword with zero-width characters (or homoglyphs).
  2. The ASCII filter no longer matches the word.
  3. The model tokenises across the hidden characters and reads the original request.
  4. It leaks the token and the lab marks you solved.

Why it works

The filter and the model see different things. The filter's byte comparison fails because the bytes changed; the model's tokeniser treats zero-width and look-alike characters as noise and recovers the intended words. The gap between the two is the bug.

Core principleNormalise input to a canonical form — strip zero-width characters, fold homoglyphs — before filtering, and enforce boundaries on meaning, not raw bytes.

Where this happens in the real world

Invisible-Unicode and homoglyph tricks defeat many naive input filters and are a staple OWASP LLM01 Prompt Injection technique. They also matter for content moderation and search, anywhere raw-byte matching meets a smarter consumer.

How to defend against it

  • Unicode-normalise and strip invisible characters (zero-width, bidi, combining marks) before filtering.
  • Fold homoglyphs to a canonical alphabet so look-alikes cannot evade matches.
  • Filter on intent, not exact byte strings.
  • Keep secrets out of the model and gate sensitive output and actions.
Mr Elite tip: Before any keyword filter, canonicalise the text the way the model effectively does. A filter that compares raw bytes will always lag a model that reads through Unicode noise.

Try it, then go further

Reading about it is the easy part. Open the lab, try your own approach before peeking at the spoiler, and see how many attempts it takes.

❓ Frequently asked questions

What is a Unicode jailbreak?
Bypassing an ASCII keyword filter by inserting invisible or look-alike Unicode into banned words, which the model still reads normally while the filter no longer matches.
Why does the model still understand it?
Tokenisers treat zero-width characters and homoglyphs as noise and recover the intended words, so the meaning survives even though the bytes changed.
How do I defend against it?
Unicode-normalise and strip invisible characters and fold homoglyphs before filtering, filter on intent, and keep secrets out of the model.
Which OWASP category?
LLM01 Prompt Injection in the OWASP Top 10 for LLM Applications (2025).
⚡
Join free to earn XP for reading this article Track your progress, build streaks and compete on the leaderboard.
Join Free
Lokesh N. Singh aka Mr Elite
Lokesh N. Singh aka Mr Elite
Founder, Securityelites · AI Red Team Educator
Founder of Securityelites and creator of the SE-ARTCP credential. Working penetration tester focused on AI red team, prompt injection research, and LLM security education.
About Lokesh ->

Leave a Comment

Your email address will not be published. Required fields are marked *