JSON Barcode Decoder

Decode JSON from QR codes into readable fields and values

JSON

Our free JSON barcode decoder parses JSON text encoded in QR codes or other barcode formats into readable keys, values, objects and arrays. For example, {"sku":"A123","qty":2} contains two named fields. JSON describes the structure of the text inside a barcode; it is not a barcode symbology.

Need to decode JSON barcodes in your app?

Copy the example below to get started using our free Barcode Parser API. No API key needed.

cURL Node.js Python C# Go PHP Java HTML
barcode=$'{"name": "Josh", "age": 20}'
curl -sS -G https://parser.orcascan.com/ \
    --data-urlencode "barcode=$barcode" \
    --data-urlencode 'type=json'
// Node.js 18+
var barcode = "{\"name\": \"Josh\", \"age\": 20}";
var url = "https://parser.orcascan.com/?barcode=" + encodeURIComponent(barcode) + "&type=json";

fetch(url)
    .then(function(res) { return res.json(); })
    .then(console.log);
import json
from urllib.parse import quote
from urllib.request import urlopen

barcode = "{\"name\": \"Josh\", \"age\": 20}"
url = "https://parser.orcascan.com/?barcode=" + quote(barcode, safe="") + "&type=json"

with urlopen(url) as response:
    print(json.load(response))
using System;
using System.Net.Http;

var barcode = "{\"name\": \"Josh\", \"age\": 20}";
var url = "https://parser.orcascan.com/?barcode=" + Uri.EscapeDataString(barcode) + "&type=json";

using var client = new HttpClient();
Console.WriteLine(await client.GetStringAsync(url));
package main

import (
    "io"
    "net/http"
    "net/url"
    "os"
)

func main() {
    barcode := "{\"name\": \"Josh\", \"age\": 20}"
    endpoint := "https://parser.orcascan.com/?barcode=" + url.QueryEscape(barcode) + "&type=json"
    res, err := http.Get(endpoint)
    if err != nil { panic(err) }
    defer res.Body.Close()
    io.Copy(os.Stdout, res.Body)
}
<?php
$barcode = "{\"name\": \"Josh\", \"age\": 20}";
$url = "https://parser.orcascan.com/?barcode=" . rawurlencode($barcode) . "&type=json";

echo file_get_contents($url);
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.*;
import java.nio.charset.StandardCharsets;

class BarcodeParser {
    public static void main(String[] args) throws Exception {
        String barcode = "{\"name\": \"Josh\", \"age\": 20}";
        String url = "https://parser.orcascan.com/?barcode=" +
            URLEncoder.encode(barcode, StandardCharsets.UTF_8) + "&type=json";
        var request = HttpRequest.newBuilder(URI.create(url)).build();
        var response = HttpClient.newHttpClient().send(
            request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
<!doctype html>
<html>
<body>
<pre id="result">Loading...</pre>
<script>
var barcode = "{\"name\": \"Josh\", \"age\": 20}";
var url = "https://parser.orcascan.com/?barcode=" + encodeURIComponent(barcode) + "&type=json";
fetch(url)
    .then(function(res) { return res.json(); })
    .then(function(json) {
        document.getElementById("result").textContent = JSON.stringify(json, null, 2);
    });
</script>
</body>
</html>

Need to decode lots of JSON barcodes?

Import a spreadsheet of barcodes and automatically extract their data into separate columns.

Decode barcodes in bulk →

Need to extract JSON data as you scan?

Scan barcodes with your phone and automatically capture their data in a shared spreadsheet.

Scan with your phone →

Frequently asked questions

Can a QR code contain a JSON object or array?

Yes. A QR code can store JSON text such as {"sku":"A123","qty":2}. After reading the symbol, the parser can extract object properties and array elements.

What is the difference between reading a QR code and parsing its JSON?

Reading a QR code retrieves its text payload. JSON parsing then interprets that text as objects, arrays, strings, numbers, booleans or null.

Why does my JSON barcode fail to parse?

JSON requires valid syntax, including double-quoted property names, correct separators and properly closed brackets. A decoded text string can be readable but still not be valid JSON.

Need help tracking JSON barcodes?

We've helped organizations of all sizes tackle barcode challenges, chat with our team live for help to find a solution.