1 creditBarcode API — every common symbology
Nine symbologies, check-digit validation, print-resolution PNG or vector SVG.
ASHDOCS generates nine barcode symbologies — including GS1-128, DataMatrix, PDF417 and ITF-14 — as PNG, SVG or PDF, with check digits validated rather than assumed, and batches rendered either as a ZIP of images or as one printable label sheet. A free version runs in the browser with no account.
Free account. No card required.
How does the Barcode API work?
One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.
curl -X POST https://www.ashdocs.com/api/v1/tools/barcode \
-H "X-API-Key: ash_live_..." \
-H "Content-Type: application/json" \
-d '{"data":"5901234123457","symbology":"ean13","options":{"format":"svg","height_mm":25}}'import requests
r = requests.post(
"https://www.ashdocs.com/api/v1/tools/barcode",
headers={"X-API-Key": "ash_live_..."},
json={
"data": "5901234123457",
"symbology": "ean13",
"options": {
"format": "svg",
"height_mm": 25
}
},
)
job = r.json()
print(job["status"], job["output_files"][0]["url"])const res = await fetch("https://www.ashdocs.com/api/v1/tools/barcode", {
method: "POST",
headers: { "X-API-Key": "ash_live_...", "Content-Type": "application/json" },
body: JSON.stringify({"data":"5901234123457","symbology":"ean13","options":{"format":"svg","height_mm":25}}),
});
const job = await res.json();
console.log(job.status, job.output_files[0].url);using var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "ash_live_...");
var body = new StringContent(
"{\"data\":\"5901234123457\",\"symbology\":\"ean13\",\"options\":{\"format\":\"svg\",\"height_mm\":25}}",
Encoding.UTF8, "application/json");
var res = await client.PostAsync("https://www.ashdocs.com/api/v1/tools/barcode", body);
var job = await res.Content.ReadAsStringAsync();
Console.WriteLine(job);import java.io.ByteArrayOutputStream;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
public class Sample {
public static void main(String[] args) throws Exception {
String json = "{\"data\":\"5901234123457\",\"symbology\":\"ean13\",\"options\":{\"format\":\"svg\",\"height_mm\":25}}";
HttpRequest req = HttpRequest.newBuilder(URI.create("https://www.ashdocs.com/api/v1/tools/barcode"))
.header("X-API-Key", "ash_live_...")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
}
}#include <stdio.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
if (!curl) return 1;
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "X-API-Key: ash_live_...");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "{\"data\":\"5901234123457\",\"symbology\":\"ean13\",\"options\":{\"format\":\"svg\",\"height_mm\":25}}");
curl_easy_setopt(curl, CURLOPT_URL, "https://www.ashdocs.com/api/v1/tools/barcode");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
CURLcode rc = curl_easy_perform(curl);
printf("\n");
curl_slist_free_all(headers);
curl_easy_cleanup(curl);
return rc == CURLE_OK ? 0 : 1;
}Common use cases
- →Product labels and packaging runs
- →Warehouse and asset tags
- →Stamping barcodes onto existing PDFs
Frequently asked questions
Which symbologies are supported?+
Nine: Code 128, GS1-128, Code 39, EAN-13, EAN-8, UPC-A, ITF-14, DataMatrix and PDF417.
Can I get SVG or PDF rather than PNG?+
Yes, both, at no extra cost.
How many can I generate at once?+
Up to a hundred per job today, returned as a ZIP or as a printable sheet with columns, gaps and labels.
Is there a free version?+
Yes — /barcode-generator runs in the browser with no account.