Malaysian Lesen Memandu (Driving License) OCR API

Automate eKYC and driver onboarding in Malaysia. Instantly extract the IC Number, license validity, and vehicle classes from a Jabatan Pengangkutan Jalan (JPJ) driving license. Upload a sample image below to test the extraction accuracy for free.

200 free credits = 100 Driver License scans, no credit card. Then from $5 for 500 credits, pay as you go. See pricing

Diagram showing the OCR API scanning a Malaysian Lesen Memandu, accurately extracting the IC number and classifying the vehicle category as Class D.

The Complexity of Extracting Data from a Lesen Memandu

The Malaysian driving license (Lesen Memandu), issued by the JPJ, is a critical document for identity verification and fleet onboarding. However, standard text-recognition tools struggle with its specific layout. The most vital piece of information—the 12-digit NRIC (National Registration Identity Card) number—is often printed without a clear prefix, and vehicle classes (such as D for cars or B2 for motorcycles) are clustered tightly with issue dates. Generic models frequently misalign these fields or fail to accurately parse the dual-language (Malay/English) headers. To see how our layout-aware identity models overcome these regional data extraction challenges, explore our core driver license OCR capabilities.

Edge-Routed Speed & Zero-SDK Architecture

For the Southeast Asian market, performance and app size are critical. We deliver our Lesen Memandu OCR engine as a pure REST API, eliminating the need to force bloated SDKs onto your users' devices. StructOCR is natively deployed on Cloudflare's global edge network, meaning API requests originating from Kuala Lumpur or Penang are processed at the nearest local node for lightning-fast TTFB (Time to First Byte). Whether you send a direct file upload or a Base64-encoded string, our engine returns structured JSON instantly.

Live Demo: Driver License OCR Scanner

No registration required. Upload a file to test the extraction.

1
Upload
2
Results
↑

Drop files here or click to browse

JPG · PNG · PDF · TIFF  ·  up to 500 files · max 4.5 MB each

No document handy?

No files selected
Need more testing? Create a free account to get 200 free credits (equals 100 Driver License scans).

High-Growth Use Cases in Malaysia

Fintech & Digital Wallet eKYC

Accelerate user onboarding for e-wallets and crypto exchanges. Instantly extract the 12-digit IC number from the driving license to cross-reference with national identity databases. To remove cross-border payment friction, you can manage your API subscription natively using USDT/USDC. Explore our flexible pricing plans.

Ride-Hailing & Delivery Onboarding

Automate gig-economy fleet registration. Instantly verify if a new driver holds the correct Class B2 (motorcycle) or Class D (car) license, and check the expiration date before authorizing them to take orders. Read more about our mobility driver verification solutions.

Vehicle Rental & Tourism

Streamline car rentals across Malaysia. Capture the driver's details and license validity accurately using just a smartphone photo, removing manual data entry bottlenecks at the rental counter.

Technical Specs

  • Edge Processing Architecture: Deployed entirely on Cloudflare Workers, ensuring that API requests from Southeast Asia are handled by regional edge nodes for near-zero routing latency.
  • Input Versatility: Fully supports multipart file uploads and raw Base64 strings, eliminating the need to compile and maintain heavy native Android/iOS SDKs.
  • Base64 Auto-Cleansing: Our API intelligently sanitizes malformed Base64 payloads (e.g., stripping carriage returns and spaces) prior to processing.
  • Cryptocurrency Payments: Designed for global SaaS compliance and convenience, developers can fund API usage seamlessly via traditional credit cards or Web3-native USDT/USDC.

Key Features

  • Precise IC Extraction: Contextually isolates the 12-digit Malaysian IC number (NRIC) and maps it reliably to the `personal_number` field.
  • Categorical Accuracy: Extracts specific Malaysian vehicle class codes (e.g., B2, D, E) and maps them to `vehicle_class` for immediate fleet authorization.
  • Date Standardization: Natively converts the local date formats printed on the license into strict, database-ready `YYYY-MM-DD` ISO strings.

Integration & AI Prompts

Integrating our API into your backend takes minutes. We natively process direct file uploads, public URLs, and Base64-encoded strings—automatically stripping out illegal whitespaces or newlines to ensure your requests never fail. For comprehensive endpoint parameters, consult our developer documentation.

import requests
import base64

# 1. Prepare Base64 Image of the Malaysian Lesen Memandu
with open("malaysian_license_sample.jpg", "rb") as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

url = "https://api.structocr.com/v1/driver-license"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}

# Pass the pure Base64 string directly
payload = {
    "img": base64_image 
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()

if result.get('success'):
    data = result['data']
    print(f"✅ Extracted IC (NRIC): {data['personal_number']}")
    print(f"✅ Name: {data['surname']} {data['given_names']}")
    print(f"✅ Vehicle Category: {data['vehicle_class']}")

Standardized JSON Output

Observe how the unique data points of a Malaysian driving license are mapped into a standardized schema. The IC number is securely placed in `personal_number`, while the vehicle category is cleanly extracted to `vehicle_class`.

{
  "success": true,
  "data": {
    "type": "drivers_license",
    "country_code": "MYS",
    "region": "SELANGOR",
    "document_number": "12345678",
    "personal_number": "900515-14-5566",
    "surname": "BIN ABDULLAH",
    "given_names": "AHMAD",
    "sex": "M",
    "date_of_birth": "1990-05-15",
    "place_of_birth": "KUALA LUMPUR",
    "date_of_issue": "2022-06-10",
    "date_of_expiry": "2027-05-15",
    "date_of_first_issue": null,
    "issuing_authority": "JPJ MALAYSIA",
    "address": "NO 12 JALAN MAJU, TAMAN SENTOSA, 40000 SHAH ALAM, SELANGOR",
    "vehicle_class": "D, B2",
    "extra_details": {}
  }
}

Frequently Asked Questions

Can I test the Malaysian Lesen Memandu OCR before purchasing?

Yes! You can use the free image upload testing widget at the top of this page. Upload a sample photo of a driving license to evaluate the extraction speed and accuracy instantly.

Do I need to install a heavy SDK in my mobile app?

No, StructOCR operates as a pure REST API. You can simply capture the document image using the user's native camera, convert it to a Base64 string, and POST it to our endpoint. This approach drastically reduces your app's bundle size.

Does the API extract the 12-digit IC number?

Yes. The API is specifically trained on Malaysian formats and reliably extracts the IC number (NRIC), placing it inside the structured `personal_number` field within the JSON response.

Explore More Driver License OCR Solutions

SOLUTION

Philippine LTO Driver License OCR API

Accurately extract data from Philippine LTO driver's licenses. Parse restriction codes, conditions, and identity fields via our edge-routed API. Test for free.

Driver License OCR
SOLUTION

Indonesian SIM OCR API

Extract NIK, identity, and category data from Indonesian driver's licenses (Surat Izin Mengemudi). Test our low-latency, edge-routed API with a free image upload.

Driver License OCR
SOLUTION

UK Driving Licence OCR API

Extract name, licence number (field 5), address (field 8), dates and categories from UK DVLA driving licences as JSON. Free upload test and 100 free API scans.

Driver License OCR
SOLUTION

US Driver License Scanner API & SDK

Scan US driver's licenses from all 50 states with a REST API or our Python and Node SDKs. Extract name, DOB, address and the Document Discriminator (DD). 100 free scans.

Driver License OCR
SOLUTION

Brazilian CNH OCR API

Extract CPF, RG, and identity fields from Brazilian Carteira Nacional de Habilitação (CNH) instantly. High-accuracy OCR API deployed on edge networks for fast LatAm eKYC.

Driver License OCR
SOLUTION

CPF Extraction from Driver License API

Accurately extract the CPF (Tax ID) and RG from Brazilian driver licenses (CNH). Try our free image upload tool and integrate our fast, edge-routed OCR API.

Driver License OCR
SOLUTION

Document Discriminator (DD) Extraction API

Instantly extract the Document Discriminator (DD) and audit numbers from US driver's licenses. Test our edge-routed OCR API for free using image uploads.

Driver License OCR
SOLUTION

EU Driving Licence OCR API

Accurately parse numbered fields (1, 4a, 9) from European driving licences. Try our fast, edge-routed OCR API with a free image upload test.

Driver License OCR
SOLUTION

India Driving Licence OCR API

Extract the licence number, the holder's name, date of birth, father's or guardian's name where printed, address, issue and validity dates and vehicle classes from the Indian driving licence as JSON with one API call. Try it free in the browser; new accounts get 100 free licence scans.

Driver License OCR

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

From tutorial to production in 5 minutes.

You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.

Instant Access Cancel Anytime No Credit Card