EDGE ENGINE SUB-2MS DETERMINISTIC V8 EXECUTION • ZERO DATA RETENTION • EXPLORE API SPECS →
ISO 17442 Legal Entity Identifier <1ms Edge Edge Compute

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.

Latency: <1ms Edge Availability: 99.99% Standard: ISO 17442-1:2020 / GLEIF In-Memory Execution
Interactive Edge Workbench

⚡ 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.

32KB Demo Cap 60 req/min Burst <2ms V8 Compute Zero Data Retention
input.txt 0 B
output.json demo-ready
Status: Ready
{
  "status": "Click RUN VALIDATION to execute on the Cloudflare edge..."
}
Sandbox Quota: Free Tier (50 reqs/mo) • Production keys from $29/mo Get Free Sandbox Key →
Need 512KB+ Payloads, High-Throughput & 99.9% Production SLA?
Direct API keys include pooled monthly quotas, zero cold-starts, and HIPAA BAA eligibility on the Mega tier.
Get Production API Key →
LLM / MCP
Prompt-Ready Specification for AI Agents llms.txt
Structured format rules and schemas optimized for LLM coding agents and Model Context Protocol tooling.
Raw .md
Official Standard & Validation Protocol Authority: Global Legal Entity Identifier Foundation (GLEIF) ↗

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.

Latency
<1ms Edge
Standard
ISO 17442-1:2020 / GLEIF
Version
Max Payload
512 KB
Privacy
In-Memory (0 bytes stored)

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).

PositionsComponentFormat / ExampleDescription & Authority
1-4LOU Prefix5493, 2138, 5299, 3358Identifies GLEIF-accredited issuing Local Operating Unit
5-6Reserved Characters00Reserved zeroes mandated by ISO 17442 for future expansion
7-18Entity Identifier006MHB84DD0ZWVUnique alphanumeric identifier assigned to the legal counterparty
19-20Check Digits18 (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:

HTTP 200 JSON Response Envelope
{
  "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

How is the ISO 7064 MOD 97-10 check digit calculated for an LEI?

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.

Can an LEI contain special characters, spaces, or lowercase letters?

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:

Complementary Enterprise APIs

Seamlessly orchestrate data pipelines across adjacent financial, regulatory, and supply-chain protocols:

All Global LEI & Corporate Tax ID Validator API Formats & Specifications (4) Directory Index ↓
LEI Number Format Rules & ISO 17442 Check Digit Validator SWIFT BIC to GLEIF LEI Mapping Standard & Cross-Referencing ISO 20275 Entity Legal Form (ELF) Code Directory & Resolver GLEIF Level 2 Relationship Data (Who Owns Whom) Model