Verify Age Online without Data Exposure: Client-Side Web ID Scanner for Age Assurance
Age verification is no longer a light-touch checkbox at the door of an age-restricted website.
// JavaScript
importScripts("ocrstudiosdk_wasm.js")
const OCRSTUDIOSDK = await OCRStudioSDK(module)
instance = new OCRSTUDIOSDK.OCRStudioSDKInstance(
"{ \"enable_lazy_initialization\": false, \"enable_delayed_initialization\": true, \"initialization_num_threads\": 1}"
)
const spawnedSession = instance.CreateSession(
<SIGNATURE>, "{\"session_type\": \"document_recognition\", \"target_group_type\": \"default\", \"target_masks\": \"are.id.*\"}")
// <input type="file" id="file-selector"> must exist in HTML
fileSelector = document.querySelector("#file-selector")
fileSelector.addEventListener('change', async (event) => {
const file = event.target.files[0];
const { buffer, width, height } = await getImageBuffer(file);
const rawData = new Uint8Array(buffer);
let fileBufPtr = 0;
const cap = Math.max(rawData.byteLength * 1.5, 8 * 1024 * 1024);
fileBufPtr = OCRSTUDIOSDK._malloc(cap);
OCRSTUDIOSDK.HEAPU8.set(rawData, fileBufPtr);
const channels = rawData.byteLength / (height * width);
const image = OCRSTUDIOSDK.CreateFromRawBuffer(fileBufPtr, rawData.byteLength, width, height, channels >= 3 ? rawData.byteLength / height : width, channels);
spawnedSession.ProcessImage(image);
const result = spawnedSession.CurrentResult();
});
Age verification is no longer a light-touch checkbox at the door of an age-restricted website.
Companies building KYC and digital onboarding flows need an automated ID scanner that is secure, fast, and accurate.
Saudi Arabia continues digital expansion driven by Vision 2030, rapid foreign investment, and preparations for global events such as Expo 2030 and the FIFA World Cup 2034.
Web OCR SDK is a document recognition technology that runs directly in a web environment. With OCR Studio Web OCR SDK, document scanning, data extraction, and validation can be integrated into browser-based flows without requiring users to install a native app or plugin.
Yes. Identity documents are scanned on the user’s device, and extracted data stays client-side rather than being sent to external OCR servers. This is possible thanks to OCR Studio’s ultra-lightweight neural networks and the WebAssembly technology.
The SDK is designed for desktop and mobile browsers, including Google Chrome, Safari, Firefox, and more. Web OCR SDK can also be integrated into PWAs and messenger mini apps.
The SDK supports passport scanning, national ID cards scanning, driver’s license scanning, and residence permits scanning. In total, the SDK supports over 4,000 document templates issued in 240+ countries and territories. It can also be used for bank card scanning as well as barcode and QR code recognition.
Yes. Web OCR SDK can be equipped with specialized selfie-to-ID checks to compare a user’s face with the portrait extracted from their identity document. It can also identify logical inconsistencies in the identity document structure by comparing VIZ with MRZ.
No. ID scanning runs entirely on the web and in a single session. Users do not need to install a separate application or browser plugin.
Web OCR SDK is delivered as high-performance WebAssembly modules with built-in configuration. The SDK also includes server-side authorization, production-ready documentation, a sample application, and integration support.
Yes. The SDK can be adapted to different document recognition and identity workflows, including custom requirements for supported documents, extracted data, and integration scenarios.
For comprehensive details about our complete
range of solutions and services.
Or contact our sales team: