Free plan

Read QR / Barcodes

Read QR codes and barcodes from a picture
POST
/v1/images/decode-codes

About this tool

Finds every QR code and barcode in your pictures and shows the text or number inside each one, and where it is in the picture. It reads many types, and tries harder on blurred, tilted or small codes. If a picture holds no code, nothing is found.
For example, you take a photo of a poster and get the website address its QR code holds.

How to use it

  1. Choose this tool.
  2. Add one or more pictures with Upload or drag and drop.
  3. If you know the code type, you can limit the search to it.
  4. Press Generate.
  5. Read or copy the text shown.

What you get back

You get a list of the codes found with the text inside each, which you can copy.
GOOD TO KNOW
Reading answers inline and produces no file.
TEST IT LIVE

Try Read QR / Barcodes in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/decode-codes
Tool ID
images.decode-codes
Authentication
API key
Accepts
JPEG, PNG, WEBP, GIF, AVIF, TIFF +15 more
Background jobs
Yes
Usage group
Image
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/images/decode-codes" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'images=@photo.jpg' \
  -F 'formats=["code128"]' \
  -F 'try_harder=true' \
  -F 'validate_only=false'

Node.js

const { DavixH2I } = require('@davixlabs/h2i-sdk');

const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.decodeCodes({
    "images": 'photo.jpg',
    "formats": [
      "code128"
    ],
    "try_harder": true,
    "validate_only": false
  });
console.log(result.data, result.requestId);

PHP

<?php
require 'vendor/autoload.php';

$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->decodeCodes([
    'images' => 'photo.jpg',
    'formats' => ['code128'],
    'try_harder' => true,
    'validate_only' => false,
]);
echo $result->requestId;
FAQ

Frequently asked questions

Find and decode every QR code and barcode (code128, code39, ean13, ean8, upca, itf, codabar, datamatrix, pdf417, aztec, qrcode) in one or more images, with the position of each. Counts one file per image.

Read QR / Barcodes accepts JPEG, PNG, WEBP, GIF, AVIF, TIFF, SVG, SVGZ, BMP, ICO, APNG, PNM and 9 more. You can send several files in one request.

Read QR / Barcodes is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/images/decode-codes with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.