SMS Developer Tools
Essential utilities for optimizing SMS campaigns and debugging message encoding. Free, privacy-focused, and client-side only.
Whether you are a developer integrating SMS APIs, a marketer optimizing campaign costs, or an engineer debugging SMPP connections, these tools help you understand how SMS messages are encoded, segmented, and transmitted. All calculations happen in your browser, ensuring your message data never leaves your device.
SMS Segment Calculator
Paste your message below to detect encoding and calculate segments.
Your message contains non-GSM characters. This reduces the segment limit from 160 to 70 characters, potentially doubling your cost.
Why Use This Calculator?
SMS billing is based on "segments". A standard SMS segment is 160 characters, but only if you use the GSM-7 character set (standard letters, numbers, and symbols).
If you include a single emoji (e.g., "✅") or a special character like a smart quote, the entire message encoding switches to Unicode (UCS-2). This drops the limit to just 70 characters per segment.
For a marketing campaign with 10,000 users, accidentally sending a 71-character Unicode message (2 segments) instead of a 1-segment message effectively doubles your cost instantly.
Common culprits include smart quotes from word processors, em dashes, and emojis. Even invisible characters like non-breaking spaces can trigger Unicode mode. This calculator helps you catch these issues before sending.
Technical Breakdown
- GSM-7 Single Segment 160 chars
- GSM-7 Multi-Segment 153 chars
- Unicode Single Segment 70 chars
- Unicode Multi-Segment 67 chars
SMS PDU Decoder
- Get a raw PDU string from your GSM modem or SMSC logs.
- Paste the hex string into the input box above.
- Click Decode PDU to parse the headers.
-
* Supports standard GSM 03.40 PDU format.
Why Decode PDUs?
When SMS messages travel through the network at the lowest level, they are encoded in PDU (Protocol Data Unit) mode. This hex string contains everything: the sender, the message center (SMSC), the timestamp, and the message content itself.
Developers working with GSM modems, IoT devices, or direct SMSC connections often need to debug raw hex data to understand why a message failed or was malformed.
PDU parsing reveals details invisible in text mode: the exact encoding scheme used, whether user data headers are present for concatenated messages, and the type of address (national or international format). This information is critical for troubleshooting delivery failures and ensuring compatibility across different network operators.
07 = Length of SMSC info
91 = International format
04 = PDU Type (SMS-DELIVER)
0C = Sender address length
// This tool unpacks these bytes for you.
SMPP Log Analyzer
Parse raw SMPP logs to extract command IDs, status codes, and sequence numbers.
Understanding SMPP Logs
SMPP log analysis is essential for diagnosing message delivery issues, monitoring connection health, and optimizing throughput. By examining the command flow, status responses, and sequence matching, you can identify problems like authentication failures, throttling, invalid addresses, or network timeouts.
Commands
SMPP uses command IDs (e.g., submit_sm for sending, deliver_sm for receiving) to define the action. Responses always mirror the command ID (e.g., submit_sm_resp).
Status Codes
Every response includes a status. 0x00000000 (ESME_ROK) means success. Anything else indicates an error (e.g., Invalid Source Address, System Error).
Sequence #
Asynchronous protocols rely on sequence numbers to match requests with responses. If you send a request with sequence #105, the response must also be #105.
Frequently Asked Questions
What is an SMS segment and why does it matter?
An SMS segment is the billing unit for text messages. Standard SMS messages can contain up to 160 characters using GSM-7 encoding. When a message exceeds this limit, it gets split into multiple segments. Each segment is billed separately by carriers, so understanding segmentation helps control messaging costs. For businesses sending thousands of messages, even one extra segment per message can significantly impact the total cost.
What is the difference between GSM-7 and Unicode encoding?
GSM-7 is the standard character encoding for SMS messages. It includes basic Latin letters, numbers, and common symbols, allowing 160 characters per segment. Unicode (UCS-2) encoding is required when your message contains characters outside the GSM-7 set, such as emojis, Chinese characters, Arabic script, or special symbols. Unicode reduces the segment limit to just 70 characters because each character requires more data to encode. A single emoji in your message forces the entire text to use Unicode encoding.
What is PDU mode and when is it used?
PDU (Protocol Data Unit) mode is the raw binary format used to transmit SMS messages at the network level. Unlike text mode, PDU mode includes all message metadata in a single hex string: the service center address, sender information, timestamp, encoding scheme, and the message content itself. Developers working with GSM modems, IoT devices, or direct SMSC connections often need to parse PDU data for debugging delivery issues, analyzing message headers, or implementing custom SMS gateways.
What is SMPP and how does it work?
SMPP (Short Message Peer-to-Peer) is an industry-standard protocol used to exchange SMS messages between SMS applications and message centers. It operates over TCP/IP and uses a request-response model with specific command types like submit_sm for sending messages and deliver_sm for receiving. Each transaction has a sequence number for tracking, and responses include status codes indicating success or failure. Enterprise SMS platforms, aggregators, and carriers use SMPP for high-volume messaging because it offers better throughput and control than HTTP APIs.
How can I reduce SMS costs for my campaigns?
The most effective way to reduce SMS costs is optimizing message length and encoding. First, avoid characters that trigger Unicode encoding, such as curly quotes, em dashes, or emojis. Replace them with GSM-7 equivalents when possible. Second, keep messages concise to fit within single segments. Third, use URL shorteners for links. Fourth, personalize messages efficiently by keeping dynamic fields short. Using these tools to test your messages before sending helps identify problematic characters and estimate segment counts before committing to a campaign.