Transform - Encoding

Free QR Code Decode API Endpoint

The free QR code decode API endpoint reads a QR image and hands back the text inside it. Send the picture as base64 in a JSON body, or upload the file itself. One POST, one field in the reply.

  • No API key
  • Base64 or file upload
  • One response field
  • Image in, text out

Decode a QR code

POST/qrcode_decode

https://aisenseapi.com/services/v1/qrcode_decode

Want to see it answer before you write code? The free QR code decoder API tool posts to this same endpoint from your browser - drop or paste an image and it prints the raw response. It reads barcodes as well as QR codes.

Send a base64 image

Put the base64 of your QR image in a JSON field named payload. The service decodes the string, looks for a code and returns what it holds.

curl -X POST https://aisenseapi.com/services/v1/qrcode_decode \
  -H "Content-Type: application/json" \
  -d '{"payload":"iVBORw0KGgoAAAANSUhEUg..."}'
{
  "qrcode_content": "https://aisense.no/free-public-apis"
}

That call round-trips a code produced by the QR Code encode API endpoint. Its qrcode_image field is already base64, so the value drops straight into payload with no conversion step in between.

Upload the file instead

A multipart request works just as well, and it saves you the encoding step. Name the file field qrcode_image.

curl -X POST https://aisenseapi.com/services/v1/qrcode_decode \
  -F "qrcode_image=@qr.png"
{
  "qrcode_content": "https://aisense.no/free-public-apis"
}

The field name matters. Post the same file under the name file and the request fails with HTTP 400 rather than falling back to a guess.

Response field

FieldTypeDescription
qrcode_contentstringThe exact text carried by the QR code. A URL comes back as a URL, a serial number as a serial number.

A successful call returns that field and nothing else. There is no confidence score, no bounding box and no image metadata in the reply, so parsing stays trivial.

Errors from the free QR code decode API endpoint

Every failure comes back as HTTP 400 with a single error field. The message tells you which stage broke.

MessageCause
No valid payload. Provide a file or base64 imageNeither payload nor a file named qrcode_image reached the service.
Invalid base64 payloadThe string in payload is not valid base64.
QR decoding failed:The image opened fine but held no readable QR code.

One gotcha is worth memorising. The base64 must be raw, so a data:image/png;base64, prefix in front of the string is rejected as invalid base64. Strip everything before the comma and post only the tail.

The third message separates a transport problem from a picture problem. If you see it, the bytes arrived intact and the scan simply found nothing, which usually means a crop, a blur or too little quiet zone around the code.

Common uses

Document intake

Pull the reference number off a scanned invoice or delivery note.

Ticket checks

Read the token printed on a pass before you validate it in your own system.

Inventory moves

Turn a shelf photo into the identifier your warehouse database expects.

Agent tooling

Let a language model hand over an image and receive plain text it can reason about.

Limits and safe handling

A QR code is an encoding format, not a security control. Anyone who can scan the image can read the same payload you just decoded.

Treat whatever the free QR code decode API endpoint returns as untrusted input. Validate a decoded URL before you open it, and escape the string before you print it into a page or a shell command.

Images travel in the request body, never in the URL, so they stay out of access logs and referrer headers. The service-wide limit is 5000 requests per IP per 24 hours, and no key or account is needed to reach it.

Need the other direction, or a different alphabet? The Encoding APIs hub collects every transform on one page, and the full free public REST APIs reference lists the rest of the catalogue.