Barcode Decoder Documentation
Parameter-by-parameter guide for the original server-side CGI reader. Upload a barcode image, choose recognition settings, and receive plain text, an annotated image, or XML.
How the CGI reader works
Send an image file and optional parameters to the existing barcode CGI endpoint. The server performs decoding and responds in the output format selected with sr.
https://online-barcode-reader.com/cgi-bin/brcgifupload1 via a multipart POST request
Select types, quantity, speed and recognition modes
sr=0 text · sr=1 image · sr=2 XML
This website uses the original CGI directly. No PHP frontend, API key, BarcodeDetector or ZXing is involved. The server-side CGI program itself must already be installed and working.
General parameters
Form, output and image processing
| Parameter | Description | Values | Default |
|---|---|---|---|
fupload1 | Image file uploaded for decoding. | JPG, GIF, PNG, BMP, TIFF (including multipage) | Choose an image |
sr | Output format returned by the decoder. | 0 = Text; 1 = Image; 2 = XML | 1 (Image) * |
types | 32-bit bitmask of barcode symbologies to search. | See the complete bitmask reference below. | 922748607 * |
width | Maximum width of the generated result image when sr = 1. | Positive integer, pixels | 750 * |
height | Maximum height of the generated result image when sr = 1. | Positive integer, pixels | 510 * |
frameTime | Maximum processing time for a frame. | Milliseconds; 0 = unlimited | 0 ** |
inverse | Find positive, negative, or both image polarities. | 1 = Positive; 2 = Negative; 3 = Both | 1 ** |
p | Optional server password for non-demo operation. | Only when required by a particular CGI installation. | Not used here |
MAX_FILE_SIZE | Upload-size hint included in the original form. | 2097152 bytes = 2 MiB | 2097152 * |
* Values used by the original online-barcode-reader.com form. The CGI reference lists its own defaults: sr = Text, width = 800, height = 600, and inverse = Positive. ** CGI default; the original form does not explicitly submit this parameter.
Linear (1D) barcodes
Additional options for linear symbols
| Parameter | Description | Values | Default |
|---|---|---|---|
lnum | Maximum number of linear barcodes to find. | Number | 1 |
lspeed | Linear decoding mode. | 0 = Normal; 1 = Fast; 2 = Slow | 0 |
lshowid | Include the barcode symbology identifier. | 0 = Off; 1 = On | 0 |
lverifycheck | Verify an additional check digit. | 0 = Off; 1 = On | 0 |
lshowcheck | Include the check digit in decoded text. | 0 = Off; 1 = On | 0 (current site) |
lshowstst | Include start/stop characters. | 0 = Off; 1 = On | 0 |
lcode39ext | Enable extended Code 39. | 0 = Off; 1 = On | 0 ** |
lupceupca | Convert UPC-E to UPC-A. | 0 = Off; 1 = On | 0 ** |
lverify | Verify a linear barcode by repeated scanning. | 0 = Off; 1 = On | 0 ** |
QR Code
QR Code and Micro QR settings
| Parameter | Description | Values | Default |
|---|---|---|---|
qrnum | Maximum QR codes to find. | Number | 1 |
qrspeed | QR decoding mode. | 0 = Normal; 1 = Fast; 2 = Slow | 0 |
qrsymid | Include the QR symbology identifier. | 0 = Off; 1 = On | 0 ** |
qrmicro | Enable detection of Micro QR codes. | 0 = Off; 1 = On | 0 ** |
Data Matrix
Data Matrix decoding settings
| Parameter | Description | Values | Default |
|---|---|---|---|
dmnum | Maximum Data Matrix symbols to find. | Number | 1 |
dmspeed | Data Matrix decoding mode. | 0 = Normal; 1 = Fast; 2 = Slow | 0 |
dmsymid | Include the Data Matrix symbology identifier. | 0 = Off; 1 = On | 0 ** |
dmsupporteci | Enable Data Matrix ECI support. | 0 = Off; 1 = On | 0 ** |
dminverse | Search positive and/or inverted Data Matrix symbols. | Controls polarity; see CGI reference. | 3 * |
PDF417
PDF417 and Micro PDF417 settings
| Parameter | Description | Values | Default |
|---|---|---|---|
pdf417num | Maximum PDF417 barcodes to find. | Number | 1 |
pdf417speed | PDF417 decoding mode. | 0 = Normal; 1 = Fast; 2 = Slow | 0 |
pdf417symid | Include the PDF417 symbology identifier. | 0 = Off; 1 = On | 0 ** |
pdf417micro | Enable Micro PDF417 detection. | 0 = Off; 1 = On | 0 ** |
pdf417supporteci | Enable PDF417 ECI support. | 0 = Off; 1 = On | 0 ** |
pdf417robust | Enable robust decoding for highly distorted PDF417. | 0 = Off; 1 = On | 0 ** |
Aztec Code
Aztec decoding settings
| Parameter | Description | Values | Default |
|---|---|---|---|
aznum | Maximum Aztec codes to find. | Number | 1 |
azspeed | Aztec decoding mode. | 0 = Normal; 1 = Fast; 2 = Slow | 0 |
azsymid | Include the Aztec symbology identifier. | 0 = Off; 1 = On | 0 ** |
types bitmask reference
Exact symbology flags used by the original page's UpdateBarcodeType() function.
types value is the bitwise OR of selected symbologies. JavaScript uses signed 32-bit bitwise operations; enabling Aztec may produce a negative decimal value. The CGI receives that signed decimal string — do not convert it to an unsigned number.| Barcode type / mode | Original checkbox | Hex flag | Signed decimal flag |
|---|---|---|---|
| Code 128 | c1 | 0x00000001 | 1 |
| Code 39 | c2 | 0x00000002 | 2 |
| Interleaved 2/5 | c4 | 0x00000004 | 4 |
| EAN-13 | c8 | 0x00000008 | 8 |
| EAN-8 | c9 | 0x00000010 | 16 |
| Codabar | c3 | 0x00000020 | 32 |
| Code 11 | c7 | 0x00000040 | 64 |
| UPC-A | c10 | 0x00000080 | 128 |
| UPC-E | c11 | 0x00000100 | 256 |
| Industrial 2/5 | c5 | 0x00000200 | 512 |
| Code 93 | c6 | 0x00000400 | 1024 |
| DataBar RSS-14 | c16 | 0x00000800 | 2048 |
| DataBar Limited | c17 | 0x00001000 | 4096 |
| DataBar Stacked | c18 | 0x00002000 | 8192 |
| DataBar Expanded | c19 | 0x00004000 | 16384 |
| DataBar Expanded Stacked | c20 | 0x00008000 | 32768 |
| Aztec Unrecognized | c24 | 0x00100000 | 1048576 |
| Linear Unrecognized | c13 | 0x01000000 | 16777216 |
| PDF417 Unrecognized | c14 | 0x02000000 | 33554432 |
| Data Matrix Unrecognized | c25 | 0x04000000 | 67108864 |
| QR Code Unrecognized | c22 | 0x08000000 | 134217728 |
| Data Matrix | c15 | 0x10000000 | 268435456 |
| PDF417 | c12 | 0x20000000 | 536870912 |
| QR Code | c21 | 0x40000000 | 1073741824 |
| Aztec Code | c23 | 0x80000000 | -2147483648 |
types=1342177280types=-2147483648Sending an image from HTML
A standard HTML form is enough. The browser handles the multipart file upload; no custom JavaScript or proxy is needed.
<form action="https://online-barcode-reader.com/cgi-bin/brcgi"
method="post" enctype="multipart/form-data">
<input type="file" name="fupload1" required>
<input type="hidden" name="types" value="1342177280">
<input type="hidden" name="qrnum" value="1">
<input type="hidden" name="dmnum" value="1">
<select name="sr">
<option value="0">Text</option>
<option value="1">Image</option>
<option value="2">XML</option>
</select>
<button type="submit">Decode image</button>
</form>1342177280 enables QR Code and Data Matrix. The actual site submits all its original decoding fields. The CGI returns the response body directly, so a same-origin iframe can show its text, XML or image result.Formats, defaults & sources
Accepted images
The original upload form lists JPG, GIF, PNG, BMP and TIFF, including multipage TIFF. Its frontend limit is 2 MiB.
Defaults
A star (*) in the tables marks values explicitly submitted by the online-barcode-reader.com form. The current redesigned form uses lshowcheck=0 by default (the older source used 1). Double stars (**) indicate CGI documentation defaults for parameters not explicitly submitted by that form.
Return formats
In Text or XML mode the CGI returns corresponding data; in Image mode it returns a depiction of the decoded barcode(s). The response format is controlled by sr.
Advanced settings
Some parameters listed here are available to the CGI but are not currently exposed as controls on the site's main page. They can be included in custom multipart requests.
Reference: DataSymbol BarcodeReader CGI parameter list ↗ and the original Online Barcode Reader form. The type bitmask flags were transcribed from the original page's UpdateBarcodeType() function.
Return to the reader and upload an image using these settings.