Barcode generator
Make a Code 128, EAN-13 or UPC-A barcode as SVG, with the check digit worked out or verified for you.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/barcode-generate \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"SETGET-2026"}}'
import json, urllib.request
body = {'input': {'text': 'SETGET-2026'}}
request = urllib.request.Request("https://setget.net/v1/tools/barcode-generate", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/barcode-generate", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"SETGET-2026"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "barcode-generate",
"input": {
"text": "SETGET-2026"
}
}
{
"input": {
"text": "SETGET-2026"
}
}
Endpoint: POST /v1/tools/barcode-generate. Over MCP: run_tool with slug: "barcode-generate".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | What to encode. Code 128 takes letters, digits and symbols; EAN-13 takes 12 or 13 digits; UPC-A takes 11 or 12. |
format |
string | no | Barcode type. One of: code128, ean13, upca. Default: "code128". |
module_width |
integer | no | Width of the thinnest bar in pixels. Default: 2. From 1 to 10. |
height |
integer | no | Height of the bars in pixels. Default: 80. From 10 to 1000. |
show_text |
boolean | no | Print the value in readable characters under the bars. Default: true. |
foreground |
string | no | Bar colour: hex or a basic colour name. Default: "#000000". |
background |
string | no | Background colour: hex, a basic colour name, or "transparent". Default: "#ffffff". |
Examples
Code 128
Input
{
"text": "SETGET-2026"
}Result
Different every time. Press the example button above to see one.
EAN-13 with the check digit added (1)
Input
{
"text": "400638133393",
"format": "ean13"
}Result
Different every time. Press the example button above to see one.
UPC-A
Input
{
"text": "03600029145",
"format": "upca",
"show_text": false
}Result
Different every time. Press the example button above to see one.
Questions
- Do I type the check digit?
- Either way works. Leave it off and it is calculated; include it and it is verified, with the correct digit shown if yours is wrong.
- Which type should I use?
- Code 128 for labels, tickets and internal stock codes. EAN-13 and UPC-A are for retail products and need a number issued by GS1.
Related tools
- QR code generatorMake a scannable QR code as SVG from any text or link, with a choice of size, colours and error correction.
qr-generate - Placeholder image generatorMake an SVG placeholder image of any size with a centred label, for mock-ups and layouts.
placeholder-image - .gitignore generatorBuild a .gitignore for the languages, editors and operating systems you use, merged without duplicates.
gitignore-generate - ASCII banner text generatorTurn short text into large five-line banner letters for terminals, READMEs, logs and code comments.
ascii-banner - ASCII table generatorRender headers and rows as a box-drawing or plain ASCII table for terminals, logs and code comments.
ascii-table - Background pattern generatorMake seamless SVG background patterns (dots, grid, stripes, checker or waves) with your colours and scale.
pattern-image