PLATFORMS << WEB

MRZ Scanner for WebAssembly

The scanner in the browser: camera or uploaded image, nothing leaves the device.

  • Packagemrz.js + mrz-core.wasm
  • RequiresModern browsers; about 1.1 MB gzipped
  • Version2.5.0
  1. 1InstallGet the web SDK from Downloads in the portal.
  2. 2Register your keyA 90-day trial key comes with your account; register it once at start.
  3. 3ScanOpen the camera or scan a photo; read the MRZ text and the parsed fields.

Install

The web SDK is under Downloads in the portal. It is single-threaded and needs no special server headers: serve the files with your site.

Scan a document

WebAssemblyjavascript
import { MrzScanner } from './mrz.js';

const scanner = await MrzScanner.load();
const r = scanner.scanImage(imageData);   // canvas ImageData, or {data: RGBA bytes, width, height}
if (r && r.valid) console.log(r.text, r.fields);

scanner.scanFrame(frameImageData);        // camera frames: call on consecutive frames

Also available for