Taiwan Bank Detector | 台灣銀行代碼與 SWIFT 查詢器

Taiwan Bank Detector

台灣金融機構代碼、分行與 SWIFT/BIC 智慧查詢器

Quick test:
Showing 0 institutions

Taiwan Financial Information Service Co. (FISC / 財金資訊) & SWIFT/BIC Reference Directory.

Click any bank card to inspect SWIFT structure & domestic wire formatting.

Copied to clipboard

The Taiwan banking infrastructure is governed by a centralized interbank clearing architecture managed by the Financial Information Service Co., Ltd. (FISC / 財金資訊股份有限公司) and supervised by the Financial Supervisory Commission (FSC / 金融監督管理委員會) alongside the Central Bank of the Republic of China (Taiwan) (中央銀行). Building a reliable, production-grade Taiwan Bank Detector requires understanding the structural rules of bank identifiers, domestic wire routing numbers, international SWIFT/BIC codes, account number syntax, and the institutional categories operating within Taiwan’s financial ecosystem.

1. Structural Anatomy of Taiwan Financial Identifiers

Unlike jurisdictions that utilize a standardized International Bank Account Number (IBAN) where a checksum and bank code are embedded at fixed character offsets across every institution, Taiwan separates routing metadata from the customer’s deposit account number. A detector must therefore parse multiple distinct identifier formats depending on whether the transaction is a domestic interbank transfer, a domestic wire remittance, or an international cross-border payment.

A. The 3-Digit IFSC Bank Code (銀行代碼)

Every financial institution participating in Taiwan’s interbank ATM, ACH, or e-bill network is assigned a unique 3-digit numeric code by FISC. While the digits appear sequential, historical numbering blocks reveal institutional classifications:

  • 004 – 054: Legacy state-owned banks, specialized policy banks, and major domestic commercial banks established prior to the 1990s banking liberalization (e.g., 004 Bank of Taiwan, 005 Land Bank of Taiwan, 007 First Commercial Bank, 017 Mega International Commercial Bank).
  • 072 – 086: Foreign bank branches operating in Taiwan (e.g., 081 HSBC Taiwan, 052 Standard Chartered Taiwan, 085 Mizuho Bank).
  • 101 – 224: Regional commercial banks restructured from former credit cooperatives alongside active local credit cooperatives (信用合作社), such as 101 Taipei Star Bank, 108 Sunny Bank, and 114 Keelung First Credit Cooperative.
  • 512 – 954: Agricultural and fishery credit departments (農會信用部 and 漁會信用部), coordinated through the Agricultural Bank of Taiwan (018).
  • 700: Exclusively reserved for Chunghwa Post Co., Ltd. (中華郵政), Taiwan’s postal savings system, which processes the highest volume of retail passbook accounts in the country.
  • 803 – 826: Commercial banks chartered following the 1991 Banking Act liberalization, plus Taiwan’s three licensed digital-only banks (純網路銀行): 823 NEXT Bank (將來銀行), 824 LINE Bank Taiwan (連線銀行), and 826 Rakuten International Commercial Bank (樂天國際銀行).

B. The 4-Digit Branch Code (分行代碼) & 7-Digit Routing Number

For domestic interbank wire transfers (跨行匯款)—as opposed to ATM/online instant transfers (轉帳) which only require the 3-digit bank code and account number—senders must supply a 7-digit routing code formed by concatenating the 3-digit bank code and a 4-digit branch code (BBB + FFFF).

  • Standard Commercial Banks: Each physical or virtual business unit holds a distinct 4-digit code (e.g., 822 CTBC Bank + 0901 Business Department = 8220901). Digital-only banks typically assign a single centralized branch code (0010 or 0001) for all retail accounts.
  • The Chunghwa Post Exception (7000021): Although Chunghwa Post operates over 1,200 local post offices nationwide—each possessing its own 7-digit bureau number (局號)—all incoming domestic interbank remittances are routed through a single unified clearing code: 7000021 (Bank 700 + Unified Remittance Branch 0021). A well-engineered detector must recognize 7000021 automatically and warn users against entering a local post office branch number in the wire routing field.

C. SWIFT / BIC Codes for Cross-Border Wires

International telegraphic transfers rely on ISO 9362 Business Identifier Codes (BIC), consisting of either 8 characters (primary office) or 11 characters (specific branch, where XXX denotes the headquarters):

\text{SWIFT/BIC} = \underbrace{\text{BBBB}}_{\text{Bank Code (4)}} + \underbrace{\text{TW}}_{\text{Country (2)}} + \underbrace{\text{LL}}_{\text{Location (2)}} + \underbrace{[\text{BBB}]}_{\text{Branch (3, optional)}}

  • Country Indicator: Characters 5 and 6 are strictly TW for institutions domiciled in Taiwan.
  • Location Codes: Most Taipei-headquartered banks end their 8-character root with TP (Taipei, e.g., CTCBTWTP for CTBC Bank, ESUNTWTP for E.SUN Bank). Regional headquarters reflect their municipality, such as TK for Kaohsiung (BKAOTWTK — Bank of Kaohsiung), TN for Tainan (TNBBTWTN — King’s Town Bank), or TH for Taichung (APBKTWTH — Yuanta Bank’s legacy code).

D. Deposit Account Number Formats (帳號)

Taiwanese bank account numbers range between 10 and 14 digits depending on the institution’s core banking ledger architecture:

  • 14 Digits: Chunghwa Post (700) mandates an exact 14-digit structure comprising a 7-digit bureau code (局號) and a 7-digit account number (帳號), each incorporating a weighted check digit. Several major commercial banks (such as Cathay United Bank 013 and Bank of Taiwan 004) also utilize 12-to-14-digit formats where the leading 3 or 4 digits correspond to the originating branch code.
  • 10 to 13 Digits: Institutions like E.SUN Bank (808, 13 digits), CTBC Bank (822, 12 digits), and Taishin Bank (812, 14 digits) enforce strict fixed lengths. Validating account length alongside the bank code catches transcription errors before payment submission.

2. Detection Pipeline & Algorithmic Design

When a user or upstream API passes an unformatted string into a Taiwan Bank Detector, the input may contain hyphens, spaces, Traditional/Simplified Chinese variants (台 vs. 臺), abbreviations, or mixed alphanumeric characters. A deterministic multi-stage resolution pipeline ensures high precision without false positives.

  1. Input Sanitization & Normalization: Strip leading/trailing whitespace, hyphens (-), and full-width ASCII characters (0-9, A-Z). Normalize Chinese character variants by mapping 台 (U+53F0) and 臺 (U+81FA) interchangeably so queries like “台灣銀行” and “臺灣銀行” resolve identically.
  2. Numeric Code Classification: Extract pure digits (\D stripped):
    • Length = 3: Perform an O(1) hash lookup against the FISC 3-digit bank registry.
    • Length = 7: Split into code = digits[:3] and branch = digits[3:]. Verify the 3-digit bank code and flag whether code == “700” requires the 0021 postal remittance rule.
    • Length = 10–14: Because account numbers alone do not reliably encode the 3-digit FISC bank code (for example, a 12-digit CTBC account starting with 901… does not start with 822), the detector should classify the string as a candidate deposit account number, report its digit length, and prompt for the accompanying 3-digit bank code rather than guessing an institution.
  3. SWIFT / BIC Pattern Matching: Test uppercase alphanumeric strings against the regex ^[A-Z]{4}TW[A-Z0-9]{2}([A-Z0-9]{3})?$. Slice the first 8 characters (bic[:8]) to match the institution’s primary BIC, and extract characters 9–11 (bic[8:] or default “XXX”) as the branch identifier.
  4. Bilingual Token & Alias Matching: Evaluate text queries against indexed Traditional Chinese full names (name_zh), official short names (short_zh, e.g., 中信 for CTBC, 國泰世華 for Cathay United, 玉山 for E.SUN, 富邦 for Taipei Fubon), and English names (name_en).

3. Production TypeScript Implementation

For modern web applications, payment gateways, and Node.js microservices, a strongly typed TypeScript detector provides compile-time safety and zero-dependency execution:

export type BankCategory =

  | ‘Commercial’

  | ‘Digital’

  | ‘Postal’

  | ‘Specialized’

  | ‘ForeignLocal’

  | ‘CreditCooperative’;

export interface TaiwanBankRecord {

  code: string;

  nameZh: string;

  shortZh: string;

  nameEn: string;

  swift: string;

  category: BankCategory;

  accountLengths: number[];

  aliases?: string[];

}

export interface DetectionResult {

  matched: boolean;

  matchType?: ‘fisc_code’ | ‘domestic_routing’ | ‘swift_bic’ | ‘name_query’ | ‘account_candidate’;

  bank?: TaiwanBankRecord;

  candidates?: TaiwanBankRecord[];

  branchCode?: string;

  swiftBranch?: string;

  advisory?: string;

  error?: string;

}

const REGISTRY: TaiwanBankRecord[] = [

  { code: ‘004’, nameZh: ‘臺灣銀行’, shortZh: ‘臺銀’, nameEn: ‘Bank of Taiwan’, swift: ‘BKTWTWTP’, category: ‘Commercial’, accountLengths: [12] },

  { code: ‘005’, nameZh: ‘臺灣土地銀行’, shortZh: ‘土銀’, nameEn: ‘Land Bank of Taiwan’, swift: ‘LBOTTWTP’, category: ‘Commercial’, accountLengths: [12] },

  { code: ‘006’, nameZh: ‘合作金庫商業銀行’, shortZh: ‘合庫’, nameEn: ‘Taiwan Cooperative Bank’, swift: ‘TACBTWTP’, category: ‘Commercial’, accountLengths: [13] },

  { code: ‘007’, nameZh: ‘第一商業銀行’, shortZh: ‘一銀’, nameEn: ‘First Commercial Bank’, swift: ‘FCBKTWTP’, category: ‘Commercial’, accountLengths: [11] },

  { code: ‘008’, nameZh: ‘華南商業銀行’, shortZh: ‘華南’, nameEn: ‘Hua Nan Commercial Bank’, swift: ‘HNBKTWTP’, category: ‘Commercial’, accountLengths: [12] },

  { code: ‘009’, nameZh: ‘彰化商業銀行’, shortZh: ‘彰銀’, nameEn: ‘Chang Hwa Commercial Bank’, swift: ‘CCBCTWTP’, category: ‘Commercial’, accountLengths: [14] },

  { code: ‘012’, nameZh: ‘台北富邦商業銀行’, shortZh: ‘富邦’, nameEn: ‘Taipei Fubon Commercial Bank’, swift: ‘TPBKTWTP’, category: ‘Commercial’, accountLengths: [12, 14] },

  { code: ‘013’, nameZh: ‘國泰世華商業銀行’, shortZh: ‘國泰’, nameEn: ‘Cathay United Bank’, swift: ‘UWCBTWTP’, category: ‘Commercial’, accountLengths: [12] },

  { code: ‘017’, nameZh: ‘兆豐國際商業銀行’, shortZh: ‘兆豐’, nameEn: ‘Mega International Commercial Bank’, swift: ‘ICBCTWTP’, category: ‘Commercial’, accountLengths: [11] },

  { code: ‘700’, nameZh: ‘中華郵政’, shortZh: ‘郵局’, nameEn: ‘Chunghwa Post’, swift: ‘POSTTWTP’, category: ‘Postal’, accountLengths: [14], aliases: [‘Post Office’] },

  { code: ‘807’, nameZh: ‘永豐商業銀行’, shortZh: ‘永豐’, nameEn: ‘Bank SinoPac’, swift: ‘SINOTWTP’, category: ‘Commercial’, accountLengths: [14] },

  { code: ‘808’, nameZh: ‘玉山商業銀行’, shortZh: ‘玉山’, nameEn: ‘E.SUN Commercial Bank’, swift: ‘ESUNTWTP’, category: ‘Commercial’, accountLengths: [13] },

  { code: ‘812’, nameZh: ‘台新國際商業銀行’, shortZh: ‘台新’, nameEn: ‘Taishin International Bank’, swift: ‘TSIBTWTP’, category: ‘Commercial’, accountLengths: [14] },

  { code: ‘822’, nameZh: ‘中國信託商業銀行’, shortZh: ‘中信’, nameEn: ‘CTBC Bank’, swift: ‘CTCBTWTP’, category: ‘Commercial’, accountLengths: [12], aliases: [‘Chinatrust’] },

  { code: ‘823’, nameZh: ‘將來商業銀行’, shortZh: ‘將來銀行’, nameEn: ‘NEXT Bank’, swift: ‘NEXCTWTP’, category: ‘Digital’, accountLengths: [14] },

  { code: ‘824’, nameZh: ‘連線商業銀行’, shortZh: ‘LINE Bank’, nameEn: ‘LINE Bank Taiwan’, swift: ‘LITWTWTP’, category: ‘Digital’, accountLengths: [12] },

  { code: ‘826’, nameZh: ‘樂天國際商業銀行’, shortZh: ‘樂天銀行’, nameEn: ‘Rakuten International Commercial Bank’, swift: ‘RKTNTWTP’, category: ‘Digital’, accountLengths: [14] },

];

function normalizeText(input: string): string {

  return input

    .trim()

    .replace(/[0-9A-Za-z]/g, (ch) => String.fromCharCode(ch.charCodeAt(0) – 0xfee0))

    .replace(/臺/g, ‘台’);

}

export function detectTaiwanBank(rawInput: string): DetectionResult {

  const normalized = normalizeText(rawInput);

  if (!normalized) {

    return { matched: false, error: ‘Input string is empty.’ };

  }

  const digits = normalized.replace(/[\s-]/g, ”);

  if (/^\d+$/.test(digits)) {

    if (digits.length === 3 || digits.length === 7) {

      const bankCode = digits.slice(0, 3);

      const branchCode = digits.length === 7 ? digits.slice(3) : undefined;

      const bank = REGISTRY.find((b) => b.code === bankCode);

      if (!bank) {

        return { matched: false, error: `Unknown 3-digit FISC bank code: ${bankCode}` };

      }

      let advisory: string | undefined;

      if (bank.code === ‘700’ && branchCode && branchCode !== ‘0021’) {

        advisory = ‘Chunghwa Post domestic wire transfers require unified branch code 0021 (7000021).’;

      }

      return {

        matched: true,

        matchType: branchCode ? ‘domestic_routing’ : ‘fisc_code’,

        bank,

        branchCode,

        advisory,

      };

    }

    if (digits.length >= 10 && digits.length <= 14) {

      const matchingBanks = REGISTRY.filter((b) => b.accountLengths.includes(digits.length));

      return {

        matched: false,

        matchType: ‘account_candidate’,

        candidates: matchingBanks,

        advisory: `Detected a ${digits.length}-digit account number. Supply a 3-digit FISC bank code to confirm the institution.`,

      };

    }

  }

  const upper = normalized.replace(/\s+/g, ”).toUpperCase();

  if (/^[A-Z]{4}TW[A-Z0-9]{2}([A-Z0-9]{3})?$/.test(upper)) {

    const swiftRoot = upper.slice(0, 8);

    const swiftBranch = upper.length === 11 ? upper.slice(8) : ‘XXX’;

    const bank = REGISTRY.find((b) => b.swift === swiftRoot);

    if (bank) {

      return {

        matched: true,

        matchType: ‘swift_bic’,

        bank,

        swiftBranch,

      };

    }

    return { matched: false, error: `Valid Taiwan SWIFT format (${swiftRoot}), but institution not in local registry.` };

  }

  const queryLower = normalized.toLowerCase();

  const matches = REGISTRY.filter((b) => {

    const zhNorm = normalizeText(b.nameZh);

    const shortNorm = normalizeText(b.shortZh);

    const aliasMatch = b.aliases?.some((a) => a.toLowerCase().includes(queryLower)) ?? false;

    return (

      zhNorm.includes(normalized) ||

      shortNorm.includes(normalized) ||

      b.nameEn.toLowerCase().includes(queryLower) ||

      aliasMatch

    );

  });

  if (matches.length === 1) {

    return { matched: true, matchType: ‘name_query’, bank: matches[0] };

  }

  if (matches.length > 1) {

    return { matched: true, matchType: ‘name_query’, candidates: matches };

  }

  return { matched: false, error: `No Taiwanese financial institution matched “${rawInput}”.` };

}

4. Operational Edge Cases in Production Systems

  • Bank Mergers & Code Retirements: Taiwan’s banking sector periodically consolidates. Notably, Citibank Taiwan (021) transferred its consumer banking business to DBS Bank Taiwan (810) in August 2023, and Standard Chartered (052) previously absorbed Hsinchu International Bank (051). Production detectors should maintain a deprecatedCodes mapping table that redirects legacy codes (e.g., 021 \rightarrow 810) with an explanatory migration notice rather than failing with a generic “not found” error.
  • Virtual Accounts (虛擬帳號): E-commerce platforms, utilities, and tax authorities in Taiwan generate 14-to-16-digit virtual accounts for automated reconciliation. Virtual accounts still route through a standard 3-digit FISC bank code (frequently 822, 808, 013, or 004), so bank-code detection remains unchanged, though strict 12-digit retail account length checks should be relaxed when virtual accounts are permitted.
  • Credit Cooperatives & Farmers’ Associations: While commercial banks represent the majority of urban retail volume, rural payroll and agricultural supply chains frequently rely on regional credit cooperatives (104–224) and farmers’ associations (512–954). These institutions generally do not hold individual SWIFT/BIC codes; international wires directed to them must route through an intermediary clearing bank such as the Agricultural Bank of Taiwan (018, AGBTTWTP) or Taiwan Cooperative Bank (006, TACBTWTP).

Leave a Comment