Skip to main content

Synthetic IBAN Test Data API

MOCK DATA

Generate synthetic IBAN-shaped values for 20 countries with matching length, broad BBAN character classes and international MOD-97, or inspect the same checks.

Generated test data for fixtures and development

Base URL
/api/ibans
Capabilities
2 routes Seedable
Last updated
July 29, 2026

GET /api/ibans

Live requestRuns against the public API
No key required
GET/api/ibans

Request parameters

Two-letter country code (ISO 3166-1 alpha-2, case-insensitive) selecting the documented total length and broad BBAN character classes. Omit for a random country shape per record. Supported: AT, BE, CH, CZ, DE, DK, EE, ES, FI, FR, GB, IE, IS, IT, LU, NL, NO, PL, PT, SE; anything else is a 400 listing the options.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/ibans"
const res = await fetch("https://randomapi.dev/api/ibans");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/ibans").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/ibans"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
country string

Two-letter country code (ISO 3166-1 alpha-2, case-insensitive) selecting the documented total length and broad BBAN character classes. Omit for a random country shape per record. Supported: AT, BE, CH, CZ, DE, DK, EE, ES, FI, FR, GB, IE, IS, IT, LU, NL, NO, PL, PT, SE; anything else is a 400 listing the options.

allowed: 2 – 2
example: country=DK
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=iban,formatted
exclude list

Return all fields except these (comma-separated).

example: exclude=bban
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 5
iban string

Compact synthetic value: country code + international MOD-97 check digits + random BBAN, without spaces.

example: DE89370400440532013000

formatted string

The same IBAN in paper format — groups of four characters separated by spaces.

example: DE89 3704 0044 0532 0130 00

country string

ISO 3166-1 alpha-2 country code of the IBAN.

example: DE

checkDigits string

The two ISO 7064 MOD-97-10 check digits (a string, preserving a leading zero; always 02–98).

example: 89

bban string

Random domestic portion matching the endpoint's broad per-country character classes; national subfields, allocation and checksums are not validated.

example: 370400440532013000

Documented examples

Build-generated requests and complete responses
3
A mixed bag of ten IBANs
GET /api/ibans
{
  "data": [
    {
      "iban": "FR406535004797ENDSJBVOTBK88",
      "formatted": "FR40 6535 0047 97EN DSJB VOTB K88",
      "country": "FR",
      "checkDigits": "40",
      "bban": "6535004797ENDSJBVOTBK88"
    },
    {
      "iban": "AT290459125678877639",
      "formatted": "AT29 0459 1256 7887 7639",
      "country": "AT",
      "checkDigits": "29",
      "bban": "0459125678877639"
    },
    {
      "iban": "PL57134505018036752599790757",
      "formatted": "PL57 1345 0501 8036 7525 9979 0757",
      "country": "PL",
      "checkDigits": "57",
      "bban": "134505018036752599790757"
    },
    {
      "iban": "CZ4550198631909919974064",
      "formatted": "CZ45 5019 8631 9099 1997 4064",
      "country": "CZ",
      "checkDigits": "45",
      "bban": "50198631909919974064"
    },
    {
      "iban": "NO9574206988285",
      "formatted": "NO95 7420 6988 285",
      "country": "NO",
      "checkDigits": "95",
      "bban": "74206988285"
    },
    {
      "iban": "AT194320497437877090",
      "formatted": "AT19 4320 4974 3787 7090",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Five reproducible German IBANs
GET /api/ibans?country=DE&count=5&seed=42
{
  "data": [
    {
      "iban": "DE02465350047973638538",
      "formatted": "DE02 4653 5004 7973 6385 38",
      "country": "DE",
      "checkDigits": "02",
      "bban": "465350047973638538"
    },
    {
      "iban": "DE27004591256788776398",
      "formatted": "DE27 0045 9125 6788 7763 98",
      "country": "DE",
      "checkDigits": "27",
      "bban": "004591256788776398"
    },
    {
      "iban": "DE97813450501803675259",
      "formatted": "DE97 8134 5050 1803 6752 59",
      "country": "DE",
      "checkDigits": "97",
      "bban": "813450501803675259"
    },
    {
      "iban": "DE30150198631909919974",
      "formatted": "DE30 1501 9863 1909 9199 74",
      "country": "DE",
      "checkDigits": "30",
      "bban": "150198631909919974"
    },
    {
      "iban": "DE64874206988285708635",
      "formatted": "DE64 8742 0698 8285 7086 35",
      "country": "DE",
      "checkDigits": "64",
      "bban": "874206988285708635"
    }
  ],
  "meta": {
    "endpoint": "ibans",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Danish IBANs (lowercase code works) as CSV
GET /api/ibans?country=dk&count=3&format=csv
iban,formatted,country,checkDigits,bban
DK3146535004797363,DK31 4653 5004 7973 63,DK,31,46535004797363
DK0500459125678877,DK05 0045 9125 6788 77,DK,05,00459125678877
DK7781345050180367,DK77 8134 5050 1803 67,DK,77,81345050180367

GET /api/ibans/validate

Live requestRuns against the public API
No key required
GET/api/ibans/validate?value=DE89+3704+0044+0532+0130+00

Request parameters

Compact or ASCII-space paper input for the endpoint's limited supported-country, length, broad-BBAN and international MOD-97 checks.

Advanced response options4 options

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/ibans/validate?value=DE89%203704%200044%200532%200130%2000"
const res = await fetch("https://randomapi.dev/api/ibans/validate?value=DE89%203704%200044%200532%200130%2000");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/ibans/validate?value=DE89%203704%200044%200532%200130%2000").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/ibans/validate?value=DE89%203704%200044%200532%200130%2000"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 1
value string required

Compact or ASCII-space paper input for the endpoint's limited supported-country, length, broad-BBAN and international MOD-97 checks.

allowed: 1 – 64
example: value=DE89 3704 0044 0532 0130 00
Universal parameters Shared response and formatting options 4
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=input,canonical
exclude list

Return all fields except these (comma-separated).

example: exclude=reasons
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 13
input string

Original input exactly as supplied.

example: de89 3704 0044 0532 0130 00

canonical string

Uppercase input with ASCII spaces removed, even when invalid.

example: DE89370400440532013000

country string nullable

Uppercase two-letter prefix when syntactically present; otherwise null.

example: DE

supportedCountry boolean

Whether country is one of the 20 documented generator specifications.

example: true

expectedLength integer nullable

Registry length for a supported country; otherwise null.

example: 22

actualLength integer

Canonical character count after removing ASCII spaces.

example: 22

lengthValid boolean

Whether actualLength equals the supported country's expected length.

example: true

bban string nullable

Canonical characters after the four-character IBAN header, or null when too short.

example: 370400440532013000

bbanPattern string nullable

Broad, collapsed BBAN character-class shape for a supported country; otherwise null.

example: 18n

bbanValid boolean

Whether BBAN length and broad character classes match; national subfields and checksums are out of scope.

example: true

mod97Valid boolean

Whether syntactically eligible canonical input has ISO 7064 MOD-97 remainder 1.

example: true

valid boolean

True only for this endpoint's limited supported-country, total-length, broad-BBAN and international MOD-97 checks; not account or national validity.

example: true

reasons string[]

Stable ordered reason codes; empty exactly when valid is true.

example: []

Documented examples

Build-generated requests and complete responses
3
Inspect a German paper-format value
GET /api/ibans/validate?value=DE89%203704%200044%200532%200130%2000
{
  "data": {
    "input": "DE89 3704 0044 0532 0130 00",
    "canonical": "DE89370400440532013000",
    "country": "DE",
    "supportedCountry": true,
    "expectedLength": 22,
    "actualLength": 22,
    "lengthValid": true,
    "bban": "370400440532013000",
    "bbanPattern": "18n",
    "bbanValid": true,
    "mod97Valid": true,
    "valid": true,
    "reasons": []
  },
  "meta": {
    "endpoint": "ibans",
    "route": "/validate",
    "params": {
      "value": "DE89370400440532013000"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Normalize lowercase British input
GET /api/ibans/validate?value=gb29nwbk60161331926819
{
  "data": {
    "input": "gb29nwbk60161331926819",
    "canonical": "GB29NWBK60161331926819",
    "country": "GB",
    "supportedCountry": true,
    "expectedLength": 22,
    "actualLength": 22,
    "lengthValid": true,
    "bban": "NWBK60161331926819",
    "bbanPattern": "4a14n",
    "bbanValid": true,
    "mod97Valid": true,
    "valid": true,
    "reasons": []
  },
  "meta": {
    "endpoint": "ibans",
    "route": "/validate",
    "params": {
      "value": "GB29NWBK60161331926819"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Explain a corrupted checksum
GET /api/ibans/validate?value=DE89370400440532013001
{
  "data": {
    "input": "DE89370400440532013001",
    "canonical": "DE89370400440532013001",
    "country": "DE",
    "supportedCountry": true,
    "expectedLength": 22,
    "actualLength": 22,
    "lengthValid": true,
    "bban": "370400440532013001",
    "bbanPattern": "18n",
    "bbanValid": true,
    "mod97Valid": false,
    "valid": false,
    "reasons": [
      "INVALID_CHECKSUM"
    ]
  },
  "meta": {
    "endpoint": "ibans",
    "route": "/validate",
    "params": {
      "value": "DE89370400440532013001"
    },
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates synthetic IBAN-shaped test values that pass this endpoint's deliberately limited structural checks: a supported country prefix, the country's documented total length, broad BBAN character classes and the international ISO 7064 MOD-97-10 checksum.

The endpoint does not validate or generate national bank identifiers, branch layouts, account-allocation rules or domestic BBAN checksums. Values are randomly generated rather than sourced from accounts, but randomness cannot guarantee that a bank code is unassigned or that a complete value does not coincide with a real account. Never use generated values for transfers, ownership checks or bank-directory decisions.

Pass country (ISO 3166-1 alpha-2, case-insensitive) to pin one documented country shape, or omit it for a random country per record; an unsupported generator code returns a 400 listing every option. With seed, the same request returns identical synthetic values.

/validate accepts compact input or paper-format ASCII spaces case-insensitively and returns one stable record for the same limited checks. Its valid field means only: supported country, expected total length, matching broad BBAN character classes and international MOD-97 remainder 1. It is not an account-existence, bank-directory or country-specific domestic validation result. Malformed and unsupported values return valid=false with ordered reason codes instead of throwing from checksum arithmetic; only a missing value or input over 64 characters is a request-level 400.

Supported country shapes (broad BBAN notation: n = digits, a = uppercase letters, c = letters or digits; adjacent same-class registry components are collapsed):

Country Code IBAN length Broad BBAN character classes
Austria AT 20 16n
Belgium BE 16 12n
Switzerland CH 21 5n12c
Czechia CZ 24 20n
Germany DE 22 18n
Denmark DK 18 14n
Estonia EE 20 16n
Spain ES 24 20n
Finland FI 18 14n
France FR 27 10n11c2n
United Kingdom GB 22 4a14n
Ireland IE 22 4a14n
Iceland IS 26 22n
Italy IT 27 1a10n12c
Luxembourg LU 20 3n13c
Netherlands NL 18 4a10n
Norway NO 15 11n
Poland PL 28 24n
Portugal PT 25 21n
Sweden SE 24 20n

Use it for

  • Test form handling with values that pass this endpoint's limited length, character-class and MOD-97 checks
  • Seed fintech UI fixtures with one documented country shape (e.g. only DK or DE)
  • Generate reproducible synthetic IBAN-shaped values in CI without sourcing account data
  • Explain supported-country, total-length, broad-BBAN and international-checksum failures

Frequently asked questions

Which IBAN checks do generated values pass?

They pass this endpoint's limited checks: supported country, documented total length, broad BBAN character classes and international MOD-97. National bank, account and domestic-checksum rules are not evaluated.

Are generated values guaranteed to be unassigned?

No. Values are random and not sourced from account data, but the generator cannot guarantee that a bank code is unassigned or that a value does not coincide with a real account. Never send money to them.

Can I pick the country?

Yes — country selects one documented total length and broad BBAN character-class shape, and formatted returns the same value grouped for display.

What does valid mean in the validator response?

valid=true means only that the supported country, total length, broad BBAN character classes and international MOD-97 check pass. It does not prove account existence, allocation or national domestic validity.

Standards & references