Identify Unicode Tag Characters
How to recognize Unicode tag characters (U+E0000–U+E007F), what they change in stored text, why they are invisible, and when to keep them, strip them or use plain text instead.
Unicode tag characters are a small set of invisible code points that mirror the printable ASCII range. They have one well-established legitimate job today, which is building certain flag emoji. They are also used to hide text inside ordinary-looking strings. If you are inspecting text, deciding whether to use a tag-based transformation, or wondering why a string is longer than it looks, this review covers how to recognize these characters, what they actually change, and when plain text is the better choice.
Short verdict: is a tag-character transformation suitable?
For almost every readable-text purpose, the answer is no. Tag characters do not style, reverse, mirror or decorate anything. They are designed to be invisible and to be ignored by renderers that do not support them. Converting a message into tag characters hides it rather than formatting it, so readers, screen readers and search tools may get nothing usable from it.
The main benefit appears in one narrow case. Emoji tag sequences use tag characters to produce subdivision flags such as England, Scotland and Wales, and in that context they carry real meaning. The decisive tradeoff is that the meaning only survives where the full sequence is supported. Elsewhere it may fall back to a plain black flag, sometimes followed by unrenderable symbols. Plain text is preferable whenever the content must be readable, searchable, editable or accessible, and whenever you cannot confirm that every destination supports the sequence.
Which 'tag' are you looking for?
Searches for 'unicode tags' often mix up several unrelated things. This article is about the Unicode Tags block. Other common meanings are listed below so you can confirm you are in the right place.
- Unicode tag characters: invisible code points in the Tags block, U+E0000 to U+E007F. This is the subject of this article.
- HTML or XML tags: markup such as <b> or <span>. These are ordinary visible characters in source code, not special Unicode characters.
- Language tags: identifiers such as en-US used in metadata and markup attributes. Tag characters were originally meant to carry these inside plain text, but that use is deprecated.
- Hashtags and content tags: social or CMS labels. These have no connection to the Tags block.
- Styled 'Unicode fonts': bold, italic or script-looking letters copied from generators. These come from blocks such as Mathematical Alphanumeric Symbols, not from tag characters.
What tag characters actually change
Tag characters change the stored text. They are real code points that get saved, copied and transmitted. They are not a CSS effect, a font, or a bidirectional display trick. However, a renderer that supports them correctly gives them no visible appearance of their own. That gap between what is stored and what is shown is the core reason they are hard to spot.
The block is laid out so that each printable ASCII character has a tag counterpart at the same position plus hexadecimal E0000. For example, lowercase 'g' is U+0067, so TAG LATIN SMALL LETTER G is U+E0067. The main parts of the block are:
| Code point(s) | Name or range | Role |
| U+E0001 | LANGUAGE TAG | Originally began an in-text language tag; deprecated |
| U+E0020–U+E007E | TAG SPACE through TAG TILDE | Invisible counterparts of printable ASCII characters |
| U+E007F | CANCEL TAG | Ends a tag sequence, including emoji tag sequences |
| Other positions in U+E0000–U+E007F | Unassigned | No defined meaning |
The block sits in Plane 14, the Supplementary Special-purpose Plane. Tag characters are classified as default ignorable code points. This means software that cannot interpret them is expected to render nothing, rather than showing a replacement box. In practice, a rendering that looks clean is weak evidence that a string contains no tags.
The legitimate case: emoji tag sequences
A subdivision flag is stored as the WAVING BLACK FLAG emoji, followed by tag letters that spell a region code, followed by CANCEL TAG. The England flag, for example, uses the code 'gbeng':
England flag, as stored (7 code points)
U+1F3F4 WAVING BLACK FLAG
U+E0067 TAG LATIN SMALL LETTER G
U+E0062 TAG LATIN SMALL LETTER B
U+E0065 TAG LATIN SMALL LETTER E
U+E006E TAG LATIN SMALL LETTER N
U+E0067 TAG LATIN SMALL LETTER G
U+E007F CANCEL TAG
Scotland and Wales follow the same pattern with 'gbsct' and 'gbwls'. One flag therefore occupies 7 code points. In UTF-8 that is 28 bytes, because each of these code points takes 4 bytes. In UTF-16 it is 14 code units, which is the number a JavaScript string's length property reports. Mismatches like this between visible and stored length are one of the clearest signs that tags are present.
The hiding case: text encoded as tags
Because every printable ASCII character has an invisible twin, any ASCII message can be rewritten entirely in tag characters and appended to visible text. The word 'hi', for example, becomes U+E0068 U+E0069. On screen nothing is added, yet a program that reads the raw code points can recover the message. This technique is often discussed under the name 'ASCII smuggling'. It is a known concern for systems that pass user-supplied text to software, including AI language models, which may process code points that a human reviewer never sees.
Reversal and mirroring do not apply cleanly
Tag characters are unrelated to reverse or mirror text effects. They do interact badly with reversal tools, though. Reversing a string code point by code point moves CANCEL TAG in front of the tag letters and separates the black flag from its tags, which breaks the flag. It also produces a reversed region code that no longer means anything. A reversal that respects user-perceived characters (grapheme clusters) should keep a complete emoji tag sequence together, as it should for combining marks and other multi-code-point emoji. Before relying on a reversal tool with this kind of input, check how it handles grapheme clusters.
How to identify tag characters in a string
Because tags are designed not to show, identification means inspecting code points rather than looking at the rendered text. The following clues and methods rely on general, documented Unicode and programming-language behavior, not on any particular tool.
- Length mismatch: the character, byte or code-unit count is larger than the visible text suggests.
- Code point range: any value from U+E0000 to U+E007F is a tag character or an unassigned position in the Tags block.
- Character names: assigned tag characters have names beginning with 'TAG' (for example TAG LATIN SMALL LETTER G), plus LANGUAGE TAG and CANCEL TAG.
- Context: tags immediately after U+1F3F4 and ending with U+E007F are probably a flag sequence. Tags anywhere else are unusual and deserve scrutiny.
- Neighbors in Plane 14: Variation Selectors Supplement (U+E0100–U+E01EF) is also invisible and lives nearby, but it is a different mechanism. Check the exact range before drawing conclusions.
In Python, the standard unicodedata module returns character names, which makes a small inspector straightforward. The functions below report every tag character with its position and name, and decode any hidden ASCII payload:
import unicodedata
def find_tag_characters(text):
hits = []
for index, ch in enumerate(text):
cp = ord(ch)
if 0xE0000 <= cp <= 0xE007F:
hits.append((index, f"U+{cp:04X}", unicodedata.name(ch, "UNASSIGNED")))
return hits
def decode_tag_payload(text):
return "".join(
chr(ord(ch) - 0xE0000)
for ch in text
if 0xE0020 <= ord(ch) <= 0xE007E
)
In JavaScript, a regular expression with the u flag can match the block directly. Without the u flag, the pattern would operate on UTF-16 surrogate halves and give wrong results.
const TAG_RE = /[\u{E0000}-\u{E007F}]/gu;
const hasTags = (text) => /[\u{E0000}-\u{E007F}]/u.test(text);
const tagPoints = (text) =>
[...text.matchAll(TAG_RE)].map((m) => "U+" + m[0].codePointAt(0).toString(16).toUpperCase());
If you want a ready-made inspector rather than code, search for terms such as 'Unicode code point inspector', 'invisible Unicode character detector', 'Unicode Tags block E0000', 'emoji tag sequence' or 'ASCII smuggling detection'. No specific tools were verified for this article, so check any tool you find by pasting a known sample, such as the England flag sequence above, and confirming it lists all seven code points. Do not assume a tool's privacy or data-retention practices from its appearance. If the text is sensitive, prefer a local method like the snippets above.
Will the text stay readable and usable after copying or sharing?
Tag characters are ordinary code points as far as storage is concerned, so plain copy and paste between applications often carries them along unnoticed. Whether a given app, website, messaging service or database keeps them, strips them or rejects them depends on that destination. No destination-specific test results or documentation were supplied for this article, so treat any particular platform's behavior as unverified until you test it yourself. One successful paste does not show that other environments behave the same way.
- Readability: hidden tag payloads are invisible by design. A reader sees only the surrounding text, so any meaning carried in the tags is lost to them.
- Flags: where subdivision flag sequences are unsupported, the result may display as a plain black flag, possibly with fallback symbols. The intended region is not conveyed.
- Assistive technology: no documentation or tests on how specific screen readers announce tag characters were available here. Do not assume a screen reader will either convey or ignore them. Supply a plain-text equivalent, such as the word 'England' alongside the flag, when the meaning matters.
- Search and matching: invisible code points can make visually identical strings compare as different. This can break search, deduplication, filtering and username checks.
- Editing: users cannot see where tags start or end, so cursor movement, deletion and partial copying can leave fragments of a sequence behind.
- Length limits: a short-looking string can exceed character or byte limits, because each tag character uses 4 bytes in UTF-8 and 2 code units in UTF-16.
Keeping, stripping or replacing tag characters
If you control a system that accepts text, decide on a policy rather than leaving it to chance. Stripping every code point in U+E0000 to U+E007F removes hidden payloads, but it also reduces subdivision flags to a bare black flag. A more careful policy keeps well-formed emoji tag sequences, meaning U+1F3F4 followed by tag letters and digits and ending with U+E007F, and removes tags that appear anywhere else. When stripping is not possible, logging or displaying the decoded tag content lets reviewers see what would otherwise be hidden.
import re
# Removes all Tags-block code points, including those inside flag sequences
stripped = re.sub("[\U000E0000-\U000E007F]", "", text)
Evidence gaps
This review relies on documented Unicode structure and standard programming-language behavior. It does not include tested results for specific platforms, browsers, messaging apps, screen readers or online inspection tools, and none are claimed. Before depending on tag characters in production, or concluding that a destination strips them, run a scoped test with the exact software and versions you use.