> For the complete documentation index, see [llms.txt](https://docs.tonic.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tonic.ai/app/generation/generators/generator-reference/iban.md).

# IBAN

Generates an International Bank Account Number (IBAN).

You can choose to preserve the banking code and country code portions of the original value.

You can also choose whether Structural generates values to replace invalid source values.

## Characteristics

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><strong>Consistency</strong></td><td valign="top">Yes, can be made self-consistent.</td></tr><tr><td valign="top"><strong>Linking</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Differential privacy</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Data-free</strong></td><td valign="top">No</td></tr><tr><td valign="top"><strong>Allowed for primary keys</strong></td><td valign="top">Yes</td></tr><tr><td valign="top"><strong>Allowed for unique columns</strong></td><td valign="top">Yes</td></tr><tr><td valign="top"><strong>Uses format-preserving encryption (FPE)</strong></td><td valign="top"><p>Yes, but only when either:<br></p><ul><li>Assigned to a primary key column.</li><li>Consistency is enabled.</li></ul></td></tr><tr><td valign="top"><strong>Privacy ranking</strong></td><td valign="top"><ul><li>3 if not consistent</li><li>4 if consistent</li></ul></td></tr><tr><td valign="top"><strong>Generator ID (for the API)</strong></td><td valign="top"><a href="/pages/Ser2WaJyXVOe8eu9mVCz"><code>IbanGenerator</code></a></td></tr></tbody></table>

## How to configure

### Preserving the country and bank codes

1. To preserve the country code from the original value, toggle **Preserve Country Code** to the on position.\
   \
   If the original value is not also an IBAN, then do not enable this setting.
2. To preserve the bank code from the original value, toggle Preserve Bank Code to the on position.\
   \
   When you preserve the bank code, you must also preserve the country code. Structural automatically toggles **Preserve Country Code** to the on position.\
   \
   If the original value is not also an IBAN, then do not enable this setting.

### Handling invalid source values

1. The **Replace Invalid Values** toggle indicates whether to generate a new value when the source value is invalid.\
   \
   By default, the toggle is in the on position, and Structural generates the values.\
   \
   To instead fail and skip rows that contain an invalid value, toggle **Replace Invalid Values** to the off position.
2. When **Replace Invalid Values** is on, then from the **Country of the Generated IBANs** dropdown list, select the country code to use for the generated values.\
   \
   Structural generates an appropriate value based on the country.\
   \
   By default, Structural uses a random country for the values.
3. When **Replace Invalid Values** is on, then to also generate replacement values, toggle **Also Replace Null Values** to the on position.\
   \
   Because the replacement value for all NULL values is the same across all rows, you cannot enable this option for a column that has a uniqueness constraint.

### Enabling consistency

Toggle the **Consistency** setting to indicate whether to make the column consistent.

By default, consistency is disabled.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tonic.ai/app/generation/generators/generator-reference/iban.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
