Seven tools. Every example below was produced by calling the real code when this page was built.
Informational only. Not tax, accounting or legal advice. Results depend on rules that change; re-verify rates and dates with the Revenue Department.
promptpay_qrPromptPay QR payload + image
Build a Thai PromptPay (Thai QR Payment, EMVCo/BOT) credit-transfer QR. Returns the exact EMV payload string with a valid CRC16-CCITT-FALSE checksum, plus the QR code as an SVG string and a data: URI. target: Thai mobile number (0XXXXXXXXX or 66XXXXXXXXX, spaces/dashes ok), 13-digit national ID or tax ID, or 15-digit e-wallet ID. amount (THB, max 2 decimals) is optional: with an amount the QR is dynamic (POI 12) and the payer cannot change it; without one it is static (POI 11). Nothing is stored. Does not verify that the account exists.
argument
type
description
target
string
required
PromptPay ID: mobile 0812345678 / 66812345678 / +66 81 234 5678, 13-digit national ID or tax ID, or 15-digit e-wallet ID.
amount
number | string
optional
Optional amount in THB with at most 2 decimals, e.g. 100 or "1234.50". Omit for a static QR where the payer types the amount.
The payload follows the Bank of Thailand “Standardized Thai QR Code” guideline (EMVCo merchant-presented mode): tags 00, 01, 29 (AID A000000677010111 + mobile 01 / national or tax ID 02 / e-wallet 03), 58, 53, optional 54, 63. A mobile number becomes 0066 + 9 digits. The QR uses error-correction level M. The test suite rasterises the returned SVG and decodes it with zbarimg to confirm it equals the payload. The tool cannot check that the account exists. Targets whose 13 digits fail the ID checksum get a warning, not an error.
PromptPay QR (mobile *****5678, 100.00 THB)
Payload (EMV QPS, CRC16-CCITT BB8A):
00020101021229370016A000000677010111011300668123456785802TH53037645406100.006304BB8A
An SVG image of the QR is in structuredContent.svg (and as a data URI). Render it or encode the payload with any QR library.
Compute Thai VAT with exact integer-satang arithmetic (half-up rounding to the satang). mode 'exclusive': amount is the pre-VAT price, returns net/vat/gross. mode 'inclusive': amount already includes VAT, VAT extracted as gross*rate/(100+rate). rate: 7 (default) or 10. 7% is the temporarily reduced rate, in force through 30 Sep 2027 under Royal Decree 807 B.E. 2569 (statutory rate 10%); this was verified from Revenue Department releases on 24 Nov 2026 - the caller should re-verify before relying on it. Not tax advice.
VAT rate percent: 7 (reduced, default) or 10 (statutory).
Reduced 7% VAT (6.3% VAT + 0.7% local tax) is in force through 30 Sep 2027 under Royal Decree No. 807 B.E. 2569; the statutory rate is 10%. Verified from Revenue Department releases 18/2569 and 19/2569 on 24 Nov 2026. Re-verify before relying on it. Exclusive: vat = round(net × rate / 100). Inclusive: vat = round(gross × rate / (100 + rate)), net = gross − vat. Rounding is half-up on integer satang.
VAT 7% (amount includes VAT): net 1000.00 + VAT 70.00 = gross 1070.00 THB
result.structuredContent
{
"mode": "inclusive",
"rate": 7,
"net": "1000.00",
"vat": "70.00",
"gross": "1070.00",
"currency": "THB",
"rounding": "half-up to the satang",
"note": "Reduced 7% VAT (6.3% VAT + 0.7% local tax) is in force throu…"
}
thai_whtThai withholding tax (WHT)
Compute Thai withholding tax (หัก ณ ที่จ่าย) on a pre-VAT amount, with optional VAT combination (WHT is computed on the amount BEFORE VAT) and the amount payable to the supplier. payment_type: service 3%, rent 5%, advertising 2%, transport 1%, professional_fees 3%, prizes 5% (Thai company recipients; per Revenue Department), or 'custom' with caller-supplied custom_rate - any other rate (interest, royalties, dividends, foreign payees, ...) is NOT built in and must use 'custom'. e_wht=true applies the optional 1% e-Withholding rate (Ministerial Regulation 402 B.E. 2569) in place of 2/3/5% - only for electronically filed and remitted payments; check eligibility. Integer-satang half-up rounding. Not tax advice.
argument
type
description
amount
number | string
required
Payment amount in THB BEFORE VAT (max 2 decimals).
Payment category. Use 'custom' with custom_rate for anything else.
custom_rate
number | string
optional
Percent (0-100, max 2 decimals). Required with payment_type 'custom', not allowed otherwise.
include_vat
boolean
default false
Also add VAT to the invoice total and show amount payable = amount + VAT - WHT.
vat_rate
integer (7 | 10)
default 7
VAT rate when include_vat is true.
e_wht
boolean
default false
Apply the optional 1% e-WHT rate instead of 2/3/5% (only when the payer files and remits electronically).
Built-in rates (Thai company recipients; Revenue Department, rd.go.th/english/52471.html, Departmental Order Tor.Por. 4/2528): service 3%, rent 5%, advertising 2%, transport 1%, professional fees 3%, prizes 5%. Anything else (interest, royalties, dividends, foreign payees…) is not built in: use custom with your own rate. WHT is computed on the amount before VAT. The optional e-WHT 1% (Ministerial Regulation 402 B.E. 2569, 1 Jan 2026 – 31 Dec 2027) replaces 2/3/5% only, and you must confirm the payment qualifies.
WHT 3% (Services (to a Thai company/PE)) on 1000.00 THB (pre-VAT) = 30.00 THB.
VAT 7% = 70.00; invoice total 1070.00; amount payable to supplier = 1040.00 THB.
result.structuredContent
{
"payment_type": "service",
"payment_type_label": "Services (to a Thai company/PE)",
"rate_percent": 3,
"amount_before_vat": "1000.00",
"wht": "30.00",
"vat": "70.00",
"vat_rate": 7,
"invoice_total_with_vat": "1070.00",
"net_payable": "1040.00",
"wht_base": "amount before VAT",
"e_wht_applied": false,
"currency": "THB",
"notes": [
"Rates per Revenue Department (rd.go.th/english/52471.html; D…",
"Optional e-WHT: Ministerial Regulation No. 402 B.E. 2569 pro…"
]
}
thai_date_convertThai date / Buddhist Era converter
Convert between Buddhist Era (พ.ศ. = CE + 543) and Gregorian dates, parse Thai or English date text, validate that the date really exists (leap years), and return Thai + English weekday. Give either date (string such as '3 ธันวาคม 2569', '3 ธ.ค. 69', '2026-12-03', '3/12/2569' read as day/month/year, '3 Dec 2026'; Thai digits ok) or year+month+day. Years of 4 digits >= 2400 are treated as BE when calendar='auto'; 2-digit years are read as BE 25xx (69 -> 2569) unless calendar='CE'. format selects the main output: th-long '3 ธันวาคม พ.ศ. 2569', th-short '3 ธ.ค. 2569', iso, en. All formats are always returned.
argument
type
description
date
string
optional
Date text in Thai or English. Alternative to year/month/day.
year
integer
optional
Year (BE or CE, see calendar). Use with month and day.
month
integer
optional
Month 1-12.
day
integer
optional
Day of month.
calendar
string (auto | BE | CE)
default "auto"
How to read the input year. 'auto': >= 2400 means BE, 2-digit means BE 25xx.
format
string (th-long | th-short | iso | en)
default "th-long"
Which format goes into the 'formatted' field.
BE (พ.ศ.) = CE + 543. Accepts Thai or English month names (full/short, dots optional), Thai digits, ISO yyyy-mm-dd, and d/m/yyyy (day first). With calendar: "auto", 4-digit years ≥ 2400 are BE and 2-digit years are BE 25xx. Real-calendar validation includes Gregorian leap years (2000 yes, 1900 no, BE 2567 yes). Before 1941 the Thai year began on 1 April, so historical BE years for Jan–Mar can differ by one; the tool applies CE + 543 uniformly and says so in interpretation.
thai_id_validateThai ID / tax ID checksum validator
Validate the 13-digit Thai national ID / tax ID check digit (sum of digit*(13-position), check = (11 - sum mod 11) mod 10). Returns formatted X-XXXX-XXXXX-XX-X, the expected check digit, and for invalid numbers which single-digit corrections would satisfy the checksum (the checksum alone cannot tell which digit was mistyped). Validation only: a valid checksum does not prove the ID exists or who it belongs to. Input is processed in memory and never stored or logged. There is deliberately no ID generator.
argument
type
description
id
string
required
13-digit ID; spaces and dashes allowed, e.g. '1-2345-67890-12-1'.
Weights 13 down to 2 on the first 12 digits; check digit = (11 − (sum mod 11)) mod 10. A valid checksum only means the number is well-formed: it does not prove the ID exists or who it belongs to. Input is processed in memory; nothing is stored or logged. There is no generator on purpose: numbers starting with 0 are real juristic-person IDs.
Valid checksum: 1-2345-67890-12-1. A passing checksum only means the number is well-formed. It does not prove the ID exists, is active, or belongs to anyone.
result.structuredContent
{
"valid": true,
"formatted": "1-2345-67890-12-1",
"check_digit": {
"position": 13,
"actual": 1,
"expected": 1
},
"caveat": "A passing checksum only means the number is well-formed. It …"
}
thai_baht_textBaht amount in Thai words
Write a THB amount in Thai words as on invoices and cheques (e.g. 1234.56 -> หนึ่งพันสองร้อยสามสิบสี่บาทห้าสิบหกสตางค์; 500 -> ห้าร้อยบาทถ้วน). Handles เอ็ด (…เอ็ด) and ยี่สิบ rules, repeated ล้าน groups, and satang. Exact integer-satang parsing; more than 2 decimals or negative amounts are rejected. Max 999,999,999,999.99.
argument
type
description
amount
number | string
required
THB amount, 0 to 999,999,999,999.99, max 2 decimals. Commas allowed in strings.
Rules covered: เอ็ด for a final 1 after tens/higher places (สิบเอ็ด, หนึ่งร้อยเอ็ด, หนึ่งล้านเอ็ด), ยี่สิบ for 20–29, สิบ (not หนึ่งสิบ) for 10, repeated ล้าน groups, ถ้วน when there are no satang, and ศูนย์บาท before satang-only amounts.
thai_pit_estimateThai personal income tax estimate (brackets)
Estimate Thai personal income tax with the progressive brackets (0% to 150,000; 5/10/15/20/25/30% steps; 35% above 5,000,000 net; Revenue Department rd.go.th/26218.html). Provide EITHER net_income (taxable net income after all deductions) OR employment_income (annual salary: applies the 50% expense deduction capped at 100,000 and the 60,000 taxpayer allowance, minus optional other_allowances you total yourself). Method 1 only; no 0.5% alternative minimum, no per-allowance rules. Rough estimate, not tax advice.
argument
type
description
net_income
number | string
optional
Annual taxable net income in THB (after expenses and allowances).
employment_income
number | string
optional
Annual employment income in THB (salary/wages); expense deduction and personal allowance are applied for you.
other_allowances
number | string
optional
Extra annual allowances in THB (spouse, children, insurance, ...) already totalled by the caller. Only with employment_income.
Brackets on net taxable income: 0–150,000 exempt; 5% to 300,000; 10% to 500,000; 15% to 750,000; 20% to 1,000,000; 25% to 2,000,000; 30% to 5,000,000; 35% above (Revenue Department, rd.go.th/26218.html). employment_income applies the 50% expense deduction capped at 100,000 and the 60,000 personal allowance. Method 1 only: no 0.5% alternative method, other income types, or allowance-by-allowance rules.
Estimated personal income tax on net income 440000.00 THB: 21500.00 THB/year (1791.67/month). Method 1 (progressive brackets) only. Does not implement the 0.5% alternative minimum (s.48(2)), non-employment income expense rules, or most allowances. Brackets per rd.go.th/26218.html. Not tax advice.
All tools return content[0].text (readable), structuredContent (machine-readable) and set isError: true with an explanation when the input is invalid. Money is parsed from decimal text into integer satang; more than 2 decimals is rejected.