Back
Asciify Logo
Asciify
SOHETX

Start Of Text

STX (Start of Text) is ASCII code point 2 (0x02), Unicode U+0002. It is a C0 control character that marked where the actual payload began on a teleprinter link — everything between SOH (0x01) and STX was header metadata, everything after STX until ETX (0x03) was the data block. In IBM BSC, DLE STX opened a transparent data block where all bytes except another DLE were treated as payload. Many embedded and POS protocols still use 0x02 as a packet-start sentinel today, framing binary messages with an STX/ETX wrapper and a trailing checksum. UTF-8 encodes it as the single byte 0x02; Unicode classifies it as Cc (Control) with the alias START OF TEXT.

Control Character

Technical Details

Code Example

</>
unsigned char frame[] = {0x02,'P','I','N','G',0x03};
// STX (0x02) starts payload; ETX ends it
unsigned char lrc = 0; for (int i = 1; i < 5; i++) lrc ^= frame[i];
// LRC over bytes between STX and ETX

Frequently Asked Questions

  • STX (ASCII 2) marks the beginning of the actual message content, right after any header information. In the SOH→STX→data→ETX pattern, STX is the 'the real content starts here' boundary between metadata and payload.

  • They're bookends. STX says 'message content begins' and ETX says 'message content ends.' This framing pattern is still used in serial protocols, payment terminals, and industrial devices — the receiver knows exactly which bytes are the actual message.

  • Yes, extensively. Many payment terminal protocols (like those from Verifone and Ingenico) frame messages with STX at the start, the command/response data in the middle, ETX at the end, and a checksum byte after ETX. It's simple and reliable.

  • Ctrl+B sends STX (ASCII 2). In most modern terminals, Ctrl+B is intercepted for 'move cursor back one character' (readline) or as the tmux prefix key, so the raw byte doesn't reach applications.

@workani&@alexluthor
Privacy & legal

Privacy

No accounts, no ads, no tracking cookies, and no cross-site tracking. The only analytics we keep are faceless — anonymous, aggregated counts of pages and searches, never tied to you. We store no IP addresses, set no tracking cookies, and build no profiles. Cloudflare hosts the site and handles requests for delivery and security.

Full privacy policy·Extension privacy·legal@asciify.dev

Attributions & licenses

Twemoji
© Twitter, Inc and other contributors · CC-BY 4.0
Noto Color Emoji
© Google · Apache 2.0
Fluent UI Emoji
© Microsoft · MIT
OpenMoji
© HfG Schwäbisch Gmünd · CC-BY-SA 4.0
Toss Face
© Viva Republica (Toss) · SIL OFL 1.1
JoyPixels
© JoyPixels Inc. · Free Limited Use License
SerenityOS Emoji
© The SerenityOS Developers · BSD-2-Clause
EmojiTwo
© EmojiTwo contributors · CC-BY 4.0
Apple Color Emoji
© Apple, Inc.
Facebook Emoji
© Meta Platforms, Inc.

Apple and Facebook emoji styles are proprietary and shown here solely for reference and comparison — a common-sense application of nominative-use / fair-use principles. asciify is not affiliated with, endorsed by, or sponsored by Apple, Inc., Meta Platforms, Inc., or any other rights holder listed above. If a rights holder requests removal of their emoji style from this site, it will be removed.

All other vendor emoji are reproduced for reference and comparison under their respective open licenses listed above.

Character names and code points from the Unicode® Standard. Unicode® and the Unicode Logo are registered trademarks of Unicode, Inc.

Privacy
© asciify.dev 2025-2026