Identify the Unicode tab character

How to recognize the Unicode tab character (U+0009), tell it apart from spaces and lookalike symbols, and judge whether tabs survive copying and sharing.

The tab you type with the Tab key is a single Unicode code point: U+0009, formally named CHARACTER TABULATION and commonly called horizontal tab (HT). It is invisible, its width is decided by whatever displays it, and it is easy to confuse with ordinary spaces. This guide explains how to confirm that a tab is present, what changes when text is converted to or from tabs, and when spaces or plain structured text are the safer choice.

Quick reference: the tab code point

Property | Value
Code point | U+0009
Unicode name | CHARACTER TABULATION
Common names | horizontal tab, HT, tab
Decimal / ASCII value | 9
UTF-8 encoding | single byte 0x09
General category | Cc (control character)
White_Space property | yes
Bidirectional class | S (segment separator)
Common escape in code | \t
Caret notation | ^I (Ctrl+I)
HTML numeric reference |
HTML named reference |

Is a tab the right choice for your text?

A tab is a good fit when the receiving software is expected to interpret it: tab-separated values, indentation in source code where the project uses tabs, recipe lines in Makefiles, or pasting columns into software that splits on tabs. Its main benefit is that one stored character stands for one level of indentation or one column boundary, and each reader's software can choose how wide to draw it.

The decisive tradeoff is that a tab carries no fixed width. Alignment that looks correct in one editor can break in another that uses a different tab stop, and many environments, especially web pages and form fields, collapse or discard it. If the goal is visual alignment that must look the same everywhere, use spaces in a monospaced context or a real table structure. If the goal is plain prose to be read or shared, tabs usually add nothing and plain text with ordinary spacing is preferable.

What a tab conversion actually changes

Two different things are often both described as changing tabs. Converting tabs to spaces (often called expanding tabs) replaces each U+0009 with some number of U+0020 SPACE characters, so the stored text changes and the original tab can no longer be recovered with certainty. Changing the tab width setting in an editor, or the CSS tab-size property on a web page, changes only how a tab is drawn; the stored character stays exactly the same.

Text effects such as reversed, mirrored or styled-font text treat the tab differently from letters. Mirroring and Unicode font substitution have no alternative form for a control character, so a tab passes through unchanged. A string reversal moves the tab to a new position but keeps it as one code point, because it is a single unit with no combining marks attached. If an output shows a tab turning into a visible symbol or several spaces, the tool performed an extra substitution and the result is no longer a true tab.

How to identify a tab and tell it from lookalikes

Because a tab renders as blank space, the reliable test is to inspect the code point or bytes rather than the appearance. Signs that whitespace is a tab: the cursor jumps across the gap in one keypress, the gap snaps to a column boundary instead of matching a fixed count of spaces, and a code point inspector reports U+0009.

  • Characters that are often mistaken for a tab:
  • U+0020 SPACE, ordinary spaces repeated to imitate indentation
  • U+00A0 NO-BREAK SPACE, common in text copied from web pages and word processors
  • U+2003 EM SPACE and other wide spaces in the U+2000 to U+200A range, which have a fixed nominal width and are not tabs
  • U+3000 IDEOGRAPHIC SPACE, a wide space used in CJK text
  • U+000B LINE TABULATION (vertical tab), a different control character
  • U+2409 SYMBOL FOR HORIZONTAL TABULATION (␉), a visible picture of the tab name, not a tab
  • U+21E5 RIGHTWARDS ARROW TO BAR (⇥), frequently used to label the Tab key, not a tab

Useful search terms when looking for an inspector or documentation are "U+0009", "CHARACTER TABULATION", "horizontal tab", "show whitespace" or "render whitespace" for editor settings, and "code point inspector" or "Unicode character identifier" for web tools. The exact name and location of a show-whitespace option differs between editors and versions and was not verified for any specific product here, so check the editor's own documentation.

Command-line and scripting checks give an unambiguous answer. On systems with GNU coreutils, cat -A displays tabs as ^I. The od -c command prints tabs as \t, and a hex dump shows the byte 09. In Python or JavaScript, the code point of a tab is 9.

$ printf 'a\tb\n' | cat -A
a^Ib$

$ printf 'a\tb\n' | od -c
0000000   a  \t   b  \n
0000004

>>> hex(ord('\t'))
'0x9'

> '\t'.codePointAt(0)
9

Will tabs survive copying and sharing?

The tab character itself copies as one code point in most plain-text paths, but what happens next depends on the destination. In HTML, a tab in ordinary content is treated as collapsible whitespace and usually renders as a single space; it is preserved only where whitespace is kept, such as preformatted blocks or elements styled with white-space: pre, where CSS tab-size sets the visible width. Some editors, chat inputs and form fields convert tabs to spaces or remove them, and in many interfaces pressing Tab moves keyboard focus instead of inserting a character.

Tabs can change meaning, not just appearance. In tab-separated data, an extra or missing tab shifts every following value into the wrong column. In Python 3, inconsistent mixing of tabs and spaces in indentation can raise a TabError. In Makefiles, recipe lines must start with a tab by default, so a conversion to spaces breaks the build. Search behaves similarly: a search for a phrase containing a space will not match text where a tab separates the words unless the search treats all whitespace alike.

For accessibility, tabs carry no semantic structure. Text aligned into columns with tabs is not exposed to assistive technology as a table, so relationships that look obvious on screen may be lost when read aloud. How individual screen readers announce or ignore tab characters was not tested for this article and should be checked in the specific screen reader and application before relying on it. When the content must be understood in any environment, provide a plain-text equivalent with explicit separators or labels, or use a real table.

Gaps and limits of this guide

The character properties above come from the Unicode standard and widely documented behavior of HTML, CSS and common command-line tools. No specific editors, websites, messaging apps or assistive technologies were tested, so behavior in a particular destination should be confirmed with a short test: paste a sample containing a known tab, then inspect the result for U+0009.