LEI Number Format Rules & ISO 17442 Check Digit Validator
An LEI is 20 characters: a 4-character LOU prefix, 2 reserved digits, 12 entity characters, and a 2-digit MOD-97-10 checksum.
⚡ Live LEI Number Format Rules & ISO 17442 Check Digit Validator Interactive Workbench
Test real-time validation and schema parsing for LEI Number Format Rules & ISO 17442 Check Digit Validator directly in your browser. Runs in sub-5ms with zero setup.
{
"status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
Quick Summary: Verify 20-character ISO 17442 LEI check digits, LOU prefix allocations, and entity identifiers in sub-1ms pure edge compute. Validates strictly against ISO 17442 Legal Entity Identifier with sub-5ms in-memory response times.
Specification & Structural Breakdown
Technical Summary: Validates strictly against ISO 17442 Legal Entity Identifier. Payloads are parsed in memory and return clean, typed JSON in milliseconds with zero data logged.
The Legal Entity Identifier (LEI) is a 20-character alphanumeric code standardized under ISO 17442 and overseen by the Global Legal Entity Identifier Foundation (GLEIF).
Structure: Characters 1-4 represent the accredited Local Operating Unit (LOU) prefix (e.g. 5493 for Bloomberg, 2138 for London Stock Exchange, 5299 for Bundesanzeiger). Characters 5-6 are reserved (00). Characters 7-18 are the unique entity identifier assigned by the LOU. Characters 19-20 are the ISO 7064 Modulo 97-10 check digits.
Checksum Algorithm: Letters are converted to numbers where A=10 through Z=35. The entire resulting integer string is evaluated under Modulo 97: the check digits ensure that the entire 20-character sequence modulo 97 yields a remainder of exactly 1 (checksum = 1).
| Positions | Component | Format / Example | Description & Authority |
|---|---|---|---|
| 1-4 | LOU Prefix | 5493, 2138, 5299, 3358 | Identifies GLEIF-accredited issuing Local Operating Unit |
| 5-6 | Reserved Characters | 00 | Reserved zeroes mandated by ISO 17442 for future expansion |
| 7-18 | Entity Identifier | 006MHB84DD0ZWV | Unique alphanumeric identifier assigned to the legal counterparty |
| 19-20 | Check Digits | 18 (Range 02 to 98) | Calculated via ISO 7064 MOD 97-10 algorithm for fraud prevention |
Parsed JSON Response Model
The edge microservice transforms input payloads into strongly-typed hierarchical JSON envelopes with sub-5ms latency:
{
"lei": "5493006MHB84DD0ZWV18",
"louPrefix": "5493",
"louName": "Bloomberg Finance L.P.",
"entityIdentifier": "006MHB84DD0ZWV",
"checkDigits": "18",
"valid": true
}
Copy-Paste Integration Code (6 Languages)
Integrate LEI Number Format Rules & ISO 17442 Check Digit Validator directly into your production application with native, zero-dependency code snippets in cURL, Node.js, Python, Go, C#, and a ready-to-paste Claude prompt. Get a free API key → (no credit card required):
curl --request POST \
--url "https://api.stanzaapi.com/lei-validator/api/v1/lei/validate" \
--header "Content-Type: application/json" \
--header "x-api-key: YOUR_API_KEY" \
--data '{
"lei": "5493006MHB84DD0ZWV18"
}'const response = await fetch("https://api.stanzaapi.com/lei-validator/api/v1/lei/validate", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": process.env.API_KEY || "YOUR_API_KEY"
},
body: JSON.stringify({
"lei": "5493006MHB84DD0ZWV18"
})
});
const data = await response.json();
console.log(data);import requests
import json
url = "https://api.stanzaapi.com/lei-validator/api/v1/lei/validate"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
payload = {
"lei": "5493006MHB84DD0ZWV18"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())package main
import (
"bytes"
"fmt"
"io"
"net/http"
"os"
)
func main() {
url := "https://api.stanzaapi.com/lei-validator/api/v1/lei/validate"
payload := []byte(`{"lei":"5493006MHB84DD0ZWV18"}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(payload))
req.Header.Add("Content-Type", "application/json")
req.Header.Add("x-api-key", os.Getenv("API_KEY"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", Environment.GetEnvironmentVariable("API_KEY") ?? "YOUR_API_KEY");
var json = @"{""lei"":""5493006MHB84DD0ZWV18""}";
var payload = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.stanzaapi.com/lei-validator/api/v1/lei/validate", payload);
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
}Integrate the StanzaAPI lei-validator micro-API.
Endpoint: POST https://api.stanzaapi.com/lei-validator/api/v1/lei/validate
Auth header: x-api-key: YOUR_API_KEY
Content-Type: application/json
Request body:
{
"lei": "5493006MHB84DD0ZWV18"
}
Rules:
- Send the request with a 2-second timeout.
- Parse the standard envelope { success, data, meta: { latency_ms, version } }.
- On failure, read { success: false, error, code } and branch on the code.
- Do not retry 4xx responses; surface the error code to the caller.
- Treat invalid-but-well-formed payloads as HTTP 200 with data.valid === false.Frequently Asked Questions & Technical Notes
Each letter is mapped to its two-digit ASCII integer equivalent (A=10 ... Z=35). The resulting numeric string is appended with 00, divided modulo 97, and subtracted from 98. The resulting 2-digit number (02-98) forms the check digits.
No. ISO 17442 strictly forbids lowercase letters, spaces, hyphens, and punctuation. The code must consist of exactly 20 uppercase alphanumeric ASCII characters.
Related Global LEI & Corporate Tax ID Validator API Formats
Explore sibling specifications and standards in the same developer cluster:
SWIFT BIC to GLEIF LEI Mapping Standard & Cross-Referencing
Cross-reference financial institution SWIFT BIC codes with GLEIF Legal Entity Identifiers for regulatory transaction reporting.
View Format →ISO 20275 Entity Legal Form (ELF) Code Directory & Resolver
Resolve 4-character ISO 20275 ELF codes into standardized corporate entity types across 160+ jurisdictions.
View Format →GLEIF Level 2 Relationship Data (Who Owns Whom) Model
Model corporate family trees, ultimate beneficial owners, and direct/ultimate accounting consolidation parents using GLEIF Level 2 data.
View Format →Complementary Enterprise APIs
Seamlessly orchestrate data pipelines across adjacent financial, regulatory, and supply-chain protocols:
SWIFT & ISO 13616 IBAN Validator →
Verify international bank accounts and counterparty integrity in global payments.
European VIES VAT Validator →
Validate corporate VAT registration across EU member states and the UK.
ISO 20022 Financial Messaging →
Enrich pacs.008 payment instructions with authenticated LEI counterparty verification.