# Tunisian RIB: structure, IBAN and verification

> How a Tunisian RIB is built (20 digits), the link with the IBAN, what the key is for, and how to check a RIB before issuing or receiving a transfer.

Source : https://virement.tn/en/blog/tunisian-rib-structure-and-verification — last updated : 2026-09-19

The RIB (bank account identifier) identifies an account. Knowing it lets you receive a transfer; checking it prevents a payment from going to the wrong place.

## How a Tunisian RIB is built

A Tunisian RIB has **20 digits**, broken down as follows:

| Part | Number of digits | Role |
| --- | --- | --- |
| Bank code | 2 | Identifies the bank |
| Branch code | 3 | Identifies the branch |
| Account number | 13 | Identifies the account |
| RIB key | 2 | Checks the consistency of the previous digits |

Internationally, the **IBAN** is used: the letters “TN”, two check digits, then the 20 digits of the RIB.

## What the key is for

The key is calculated from the other 18 digits using a modulo-97 type of check. In practice, a simple **typing error** (one changed digit, two swapped digits) is almost always detected when the key is recalculated.

What the key does not do: it says nothing about the account **holder**, nor about the identity of the person who gave you the RIB. A RIB can be perfectly valid and yet not be that of the person you want to pay.

## Checking a RIB before paying

- **Compare the holder's name** with the person or company to be paid.
- **Confirm any change of RIB through a second channel** (a call, a meeting): it is the most common fraud on invoices.
- **Copy, don't retype**: copy-pasting from a trusted document reduces typing errors.
- **For a large first payment**, some organizations start with a small test transfer before the full amount.

## Why virement.tn verifies organizations' RIBs

A wrong or diverted RIB means money going to the wrong person — or an invoice that will never be paid. On [virement.tn](/en/how-it-works), an organization must have **at least one verified RIB** checked by the team before it can issue an invoice. Its customers thus know that the destination account has been checked.

For the basics of the payment itself, read our [guide to bank transfers in Tunisia](/en/blog/how-to-make-a-bank-transfer-in-tunisia).

## Frequently asked questions

### How many digits does a Tunisian RIB have?

20 digits: 2 for the bank code, 3 for the branch code, 13 for the account number and 2 for the RIB key.

### What is the difference between the RIB and the IBAN?

The IBAN is the international format of the account number. For Tunisia, it is made up of the letters TN, two check digits, then the 20 digits of the RIB.

### Is the RIB key enough to guarantee that the account is the right one?

No. It detects typing errors, not a deliberate substitution of the RIB. For a large amount or a new beneficiary, confirm the RIB through a second channel.
