How to Check a USDT TRC20 Address Before You Send
How to tell a valid USDT TRC20 address from a mistyped or wrong-network one, check it in code, confirm the real USDT token and watch the address.
Sending USDT on Tron is cheap and fast, and a transfer to the wrong address cannot be undone. Whether you are a person about to send, or an app taking addresses from users, it pays to check a USDT TRC20 address first. This guide covers what a valid address looks like, how to verify it in code, the mistakes that lose money most often, and how to keep an eye on the address afterwards.
What a TRC20 address looks like
- It starts with a capital
T. - It is 34 characters long.
- It uses base58: letters and digits, but never
0,O,Ior a lowercasel, which are left out because they are easy to confuse. - Capital and small letters matter: changing the case of one letter makes a different, invalid address.
- Its last characters are a checksum of the rest, so a single typo is almost always caught.
"USDT TRC20 address" simply means a normal Tron address: the same address holds TRX, USDT and every other Tron token. There is no separate USDT address.
Check it in code
A real check decodes the address and verifies its checksum, not just its length. This function does that in Node.js without any library. It decodes the base58 text into 25 bytes, checks the Tron version byte (0x41), and compares the last 4 bytes with a double SHA-256 of the first 21:
import crypto from "node:crypto";
const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
function isTronAddress(address) {
if (!/^T[1-9A-HJ-NP-Za-km-z]{33}$/.test(address)) {
return false;
}
let number = 0n;
for (const char of address) {
number = number * 58n + BigInt(ALPHABET.indexOf(char));
}
const bytes = Buffer.from(number.toString(16).padStart(50, "0"), "hex");
if (bytes.length !== 25 || bytes[0] !== 0x41) {
return false;
}
const payload = bytes.subarray(0, 21);
const checksum = bytes.subarray(21);
const hash = crypto.createHash("sha256").update(crypto.createHash("sha256").update(payload).digest()).digest();
return hash.subarray(0, 4).equals(checksum);
}
isTronAddress("TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"); // true
isTronAddress("TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6T"); // false: one letter changedUse it wherever users paste an address: a withdrawal form, a payout, a saved wallet. It runs in a browser too if you swap the hashing for the Web Crypto API.
The mistakes that lose USDT
- Wrong network. An Ethereum address (starting with
0x) is not a Tron address. USDT sent on Tron to a0xaddress cannot arrive, and USDT sent on Ethereum to aTaddress cannot either. Check that the network you send on matches the address. - A fake token. Anyone can create a Tron token named USDT. The real one is the contract
TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t. When you receive "USDT", check the contract, not the name. - Address poisoning. Scammers send tiny amounts from addresses that start and end like yours, hoping you copy theirs from your history. Always copy the address from the source, never from past transactions, and compare it in full.
- Exchange deposits that need a memo. Some exchanges share one address and tell users apart by a memo. If the exchange asks for one, send it, or the deposit may be lost.
Check the address's activity
To see an address's balance and past transfers, open it in a Tron block explorer such as Tronscan. To be told about new transfers as they happen, track it: the LirChain Wallet Tracker checks the address for you when you add it, refusing anything that is not a valid Tron address, and then sends a webhook for every confirmed USDT, USDC or TRX transfer to or from it, recognising only the real USDT contract.
curl https://api.lirchain.com/merchant/wallet-tracker/create \
-H "x-api-key: YOUR_API_KEY" \
-H "content-type: application/json" \
-d '{
"network": "tron",
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"external_id": "my-usdt-wallet"
}'const API_KEY = "YOUR_API_KEY";
async function createWalletTracker(params) {
const response = await fetch("https://api.lirchain.com/merchant/wallet-tracker/create", {
method: "POST",
headers: { "x-api-key": API_KEY, "content-type": "application/json" },
body: JSON.stringify(params),
});
if (!response.ok) {
throw new Error(`LirChain API ${response.status}: ${await response.text()}`);
}
return response.json();
}
const result = await createWalletTracker({
network: "tron",
address: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
external_id: "my-usdt-wallet",
});const API_KEY = "YOUR_API_KEY";
type CreateWalletTrackerParams = {
network: string;
address: string;
external_id?: string;
};
type CreateWalletTrackerResult = {
id: string;
project_id: string;
merchant_id: string;
network: string;
address: string;
external_id: string | null;
};
async function createWalletTracker(params: CreateWalletTrackerParams): Promise<CreateWalletTrackerResult> {
const response = await fetch("https://api.lirchain.com/merchant/wallet-tracker/create", {
method: "POST",
headers: { "x-api-key": API_KEY, "content-type": "application/json" },
body: JSON.stringify(params),
});
if (!response.ok) {
throw new Error(`LirChain API ${response.status}: ${await response.text()}`);
}
return response.json();
}
const result = await createWalletTracker({
network: "tron",
address: "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
external_id: "my-usdt-wallet",
});import requests
API_KEY = "YOUR_API_KEY"
def create_wallet_tracker(**params):
response = requests.post(
"https://api.lirchain.com/merchant/wallet-tracker/create",
headers={"x-api-key": API_KEY},
json=params,
timeout=30,
)
response.raise_for_status()
return response.json()
result = create_wallet_tracker(
network="tron",
address="TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
external_id="my-usdt-wallet",
)<?php
const API_KEY = "YOUR_API_KEY";
function create_wallet_tracker(array $params): array
{
$curl = curl_init("https://api.lirchain.com/merchant/wallet-tracker/create");
curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($params),
CURLOPT_HTTPHEADER => ["x-api-key: " . API_KEY, "content-type: application/json"],
]);
$body = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($body === false || $status >= 400) {
throw new Exception("LirChain API $status: $body");
}
return json_decode($body, true);
}
$result = create_wallet_tracker([
"network" => "tron",
"address" => "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"external_id" => "my-usdt-wallet",
]);package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
const apiKey = "YOUR_API_KEY"
func CreateWalletTracker(params map[string]any) (map[string]any, error) {
body, err := json.Marshal(params)
if err != nil {
return nil, err
}
request, err := http.NewRequest("POST", "https://api.lirchain.com/merchant/wallet-tracker/create", bytes.NewReader(body))
if err != nil {
return nil, err
}
request.Header.Set("x-api-key", apiKey)
request.Header.Set("content-type", "application/json")
response, err := http.DefaultClient.Do(request)
if err != nil {
return nil, err
}
defer response.Body.Close()
data, err := io.ReadAll(response.Body)
if err != nil {
return nil, err
}
if response.StatusCode >= 400 {
return nil, fmt.Errorf("LirChain API %d: %s", response.StatusCode, data)
}
var result map[string]any
return result, json.Unmarshal(data, &result)
}
func main() {
result, err := CreateWalletTracker(map[string]any{
"network": "tron",
"address": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"external_id": "my-usdt-wallet",
})
fmt.Println(result, err)
}The example address is the USDT contract itself. Use your own. The Free plan tracks 50 addresses, and the step-by-step guide shows how to handle the webhooks.
Questions and answers
- How can I check if a USDT TRC20 address is valid?
- It must start with T, be 34 characters long, use only base58 characters, and pass the checksum: decode it to 25 bytes, check the first byte is 0x41, and compare the last 4 bytes with a double SHA-256 of the first 21. The code in this article does exactly that.
- Is a USDT TRC20 address the same as a TRX address?
- Yes. A Tron address holds TRX and every Tron token, including USDT. There is no separate USDT address.
- What happens if I send USDT TRC20 to an ERC20 address?
- The transfer cannot reach it: a 0x address is not valid on Tron, and wallets refuse it. If funds were sent on the wrong network to an address someone controls on both, only that person can recover them.
Try it on the Free plan
Every product is included, and no card is needed to sign up.
Create a free account