SMS 7-Bit Packing
Pack a text message into the seven-bit septets an SMS carries, and read packed user data back. The page reports the septet count, the packed octets, the extension characters that cost two septets each and how many message parts the text needs. Everything is computed locally.
SMS text travels in the GSM 7-bit default alphabet of 3GPP TS 23.038: 128 septet values, plus an extension table reached through the escape septet for the square brackets, braces, vertical bar, caret, tilde, backslash, form feed and the euro sign, each of which costs two septets. The septets are packed seven bits at a time into octets, the first septet in the low bits of the first octet. When exactly seven bits are left spare in the last octet, they carry the code of carriage return instead of zeros, because seven zero bits would read as an @. One message holds 160 septets in 140 octets; longer text is split into parts of 153 septets once a six-octet concatenation header is counted. Reading hex back uses the octet length for the septet count, which cannot tell a filler carriage return from a typed one, so enter the count when the message ends with a carriage return. Nothing is uploaded, stored or sent anywhere.