ASCII 2
Start of Text (STX)
Control character
Legacy telegraphy; unused today.
All encodings at a glance
| Decimal | 2 |
| Hexadecimal | 0x02 |
| Octal | 0002 |
| Binary | 00000010 |
| HTML numeric entity |  |
| URL encoding | %02 |
| UTF-8 bytes | 0x02 |
Code snippets
JavaScript
String.fromCharCode(2); // "STX"
2.toString(16); // "02"Python
chr(2) # control char STX
ord(chr(2)) # 2
hex(2) # '0x02'HTML
 <!-- numeric entity (no named entity for this character) -->