bwip-js
App · 3 actions
Make barcodes and QR codes with bwip-js, the open-source barcode library. Turn order numbers, SKUs and tracking codes into Code 128, GS1-128, ITF-14, Data Matrix, PDF417, Aztec, postal barcodes and two dozen more; make QR codes that hold links or any text; and make retail EAN, UPC and ISBN barcodes with the check digit worked out and checked for you. Choose the size, colours and rotation, and get a PNG ready to print, email or upload. No account or API key required.
Actions
| Action | What it does |
|---|---|
| Create a barcode | Turn an order number, SKU, tracking code or any other text into a barcode image, in any of 33 common types: Code 128, Code 39, GS1-128, ITF-14, Data Matrix, PDF417, Aztec, postal barcodes and more. |
| Create a product barcode | Make the retail barcode for a product number: EAN-13, UPC-A, EAN-8, UPC-E or a book's ISBN. |
| Create a QR code | Turn a link or any other text into a QR code image, ready to email, print or drop into a document. |
Create a barcode
Turn an order number, SKU, tracking code or any other text into a barcode image, in any of 33 common types: Code 128, Code 39, GS1-128, ITF-14, Data Matrix, PDF417, Aztec, postal barcodes and more. The image is saved so later steps can print, attach or upload it. No account or API key required.
Inputs
- Text to encode
texttextRequired - What the barcode should hold. Each type accepts different characters: Code 128 takes any plain text, retail and postal types take their own number formats, and GS1 types take data written like (01)09521234543213(10)ABC123.
- Barcode type
barcode_typetext - The kind of barcode to draw. Code 128 suits almost anything; pick another when a scanner, retailer or carrier asks for it.One of:
code128(Code 128, letters and numbers (most common)),qrcode(QR code, links and text for phones),ean13(EAN-13, retail products worldwide),upca(UPC-A, retail products in the US and Canada),datamatrix(Data Matrix, small parts and healthcare labels),code39(Code 39, badges and inventory (capitals and digits)),gs1-128(GS1-128, shipping and logistics labels),itf14(ITF-14, outer cartons and cases),pdf417(PDF417, ID cards and boarding passes),azteccode(Aztec code, tickets and transport passes), and 23 more. Default:code128. - Show the text underneath
show_texttrue/false - Print the barcode's contents in plain text under the bars, so a person can read it too. 2D codes such as QR and Data Matrix never show it.Default:
true. - Size
sizenumber - How wide the thinnest bar is, in pixels, between 1 and 10. Everything else grows with it: 3 suits screens and labels, 5 or more a large print.From 1 to 10. Default:
3. - Bar height (mm)
height_mmnumber - Optional. How tall the bars are, in millimetres at full size, between 5 and 100. Leave blank for the standard height. 2D codes, postal barcodes and GS1 DataBar keep their standard shape whatever this says.From 5 to 100.
- Rotation
rotationtext - Which way round the barcode is drawn, for labels that run sideways.One of:
N(Upright),R(Turned right, a quarter turn clockwise),L(Turned left, a quarter turn anticlockwise),I(Upside down). Default:N. - Bar colour
foreground_colortext - The colour of the bars and text, as a hex colour. It has to be clearly darker than the background or scanners will not read it.Default:
#000000. - Background colour
background_colortext - The colour behind the code, as a hex colour. Keep it light so the code stands out.Default:
#ffffff. - Border
bordernumber - Blank space around the barcode, counted in thinnest-bar widths. 10 is what scanners expect; use 0 if your label design already leaves space around it.From 0 to 50. Default:
10. - Save as
filenametext - Optional. The name to save the image under. Named after what the code holds by default, e.g. lodol-1234-barcode.png.
Outputs
barcode_typetext- The kind of code that was made, for example Code 128.
content_typetext- File type of the saved barcode image.
document_reftext- Reference to the saved barcode image, for use by a later step.
documentslist- The barcode image, in the shape steps that send or upload files expect.
encoded_texttext- Exactly what a scanner reads back from the code, after any tidying up (for example a check digit added).
filenametext- Name the barcode image was saved under.
size_bytesnumber- Size of the saved barcode image in bytes.
urltext- Download link for the saved barcode image.
Example output
{
"barcode_type": "Code 128",
"content_type": "image/png",
"document_ref": "doc_5a6b7c8d9e0f11225a6b7c8d9e0f1122",
"documents": [
{
"content_type": "image/png",
"document_ref": "doc_5a6b7c8d9e0f11225a6b7c8d9e0f1122",
"filename": "lodol-1234-barcode.png",
"size_bytes": 2841,
"url": "/actions/core/serve-document/doc_5a6b7c8d9e0f11225a6b7c8d9e0f1122?teamId=6512a1b2c3d4e5f600000001"
}
],
"encoded_text": "LODOL-1234",
"filename": "lodol-1234-barcode.png",
"size_bytes": 2841,
"url": "/actions/core/serve-document/doc_5a6b7c8d9e0f11225a6b7c8d9e0f1122?teamId=6512a1b2c3d4e5f600000001"
}Create a product barcode
Make the retail barcode for a product number: EAN-13, UPC-A, EAN-8, UPC-E or a book's ISBN. Enter the number with or without its check digit; a missing one is worked out, and a wrong one is caught before anything is printed. No account or API key required.
Inputs
- Product number
numbertextRequired - The number printed under the barcode, with or without its last (check) digit. Spaces and hyphens are ignored. Write an ISBN with its hyphens to have it printed above the barcode, as on a book.
- Format
product_formattext - Which numbering the product uses. EAN-13 is the standard almost everywhere; UPC-A is used in the US and Canada.One of:
ean13(EAN-13, retail worldwide (13 digits)),upca(UPC-A, US and Canada (12 digits)),ean8(EAN-8, small packs (8 digits)),upce(UPC-E, small US packs (8 digits)),isbn(ISBN, books (13 or 10 digits)). Default:ean13. - Show the text underneath
show_texttrue/false - Print the barcode's contents in plain text under the bars, so a person can read it too. 2D codes such as QR and Data Matrix never show it.Default:
true. - Size
sizenumber - How wide the thinnest bar is, in pixels, between 1 and 10. Everything else grows with it: 3 suits screens and labels, 5 or more a large print.From 1 to 10. Default:
3. - Bar colour
foreground_colortext - The colour of the bars and text, as a hex colour. It has to be clearly darker than the background or scanners will not read it.Default:
#000000. - Background colour
background_colortext - The colour behind the code, as a hex colour. Keep it light so the code stands out.Default:
#ffffff. - Border
bordernumber - Blank space around the barcode, counted in thinnest-bar widths. 10 is what scanners expect; use 0 if your label design already leaves space around it.From 0 to 50. Default:
10. - Save as
filenametext - Optional. The name to save the image under. Named after the product number by default, e.g. 5901234123457-barcode.png.
Outputs
barcode_typetext- The kind of code that was made, for example Code 128.
check_digittext- The last digit of the product number, which tills use to catch a misread. Worked out for you if you left it off.
content_typetext- File type of the saved barcode image.
document_reftext- Reference to the saved barcode image, for use by a later step.
documentslist- The barcode image, in the shape steps that send or upload files expect.
encoded_texttext- Exactly what a scanner reads back from the code, after any tidying up (for example a check digit added).
filenametext- Name the barcode image was saved under.
size_bytesnumber- Size of the saved barcode image in bytes.
urltext- Download link for the saved barcode image.
Example output
{
"barcode_type": "EAN-13",
"check_digit": "7",
"content_type": "image/png",
"document_ref": "doc_7c8d9e0f112233447c8d9e0f11223344",
"documents": [
{
"content_type": "image/png",
"document_ref": "doc_7c8d9e0f112233447c8d9e0f11223344",
"filename": "5901234123457-barcode.png",
"size_bytes": 3392,
"url": "/actions/core/serve-document/doc_7c8d9e0f112233447c8d9e0f11223344?teamId=6512a1b2c3d4e5f600000001"
}
],
"encoded_text": "5901234123457",
"filename": "5901234123457-barcode.png",
"size_bytes": 3392,
"url": "/actions/core/serve-document/doc_7c8d9e0f112233447c8d9e0f11223344?teamId=6512a1b2c3d4e5f600000001"
}Create a QR code
Turn a link or any other text into a QR code image, ready to email, print or drop into a document. Accented letters, other alphabets and emoji all work. The image is saved so later steps can attach or upload it. No account or API key required.
Inputs
- Link or text
contenttextRequired - What the code should hold. A web address opens when scanned; anything else is shown as text.
- Damage tolerance
error_correctiontext - How much of the code can be scratched, smudged or covered and still scan. Stronger levels make the pattern denser, so step up only for things that get handled.One of:
L(Standard, the smallest code),M(Better, copes with minor damage),Q(Strong, for stickers and labels),H(Strongest, for signs and worn surfaces). Default:M. - Size
sizenumber - How big the code is drawn, between 1 and 10. Each step adds 2 pixels to every square: 4 makes a short link about 260 pixels across, and longer text makes a bigger code.From 1 to 10. Default:
4. - Code colour
foreground_colortext - The colour of the code itself, as a hex colour. It has to be clearly darker than the background or scanners will not read it.Default:
#000000. - Background colour
background_colortext - The colour behind the code, as a hex colour. Keep it light so the code stands out.Default:
#ffffff. - Border
bordernumber - Blank space around the code, counted in code squares. 4 is the standard and scans most reliably; use 0 if your design already leaves space around it.From 0 to 20. Default:
4. - Save as
filenametext - Optional. The name to save the image under. qr-code.png by default.
Outputs
barcode_typetext- The kind of code that was made, for example Code 128.
content_typetext- File type of the saved barcode image.
document_reftext- Reference to the saved barcode image, for use by a later step.
documentslist- The barcode image, in the shape steps that send or upload files expect.
encoded_texttext- Exactly what a scanner reads back from the code, after any tidying up (for example a check digit added).
filenametext- Name the barcode image was saved under.
size_bytesnumber- Size of the saved barcode image in bytes.
urltext- Download link for the saved barcode image.
Example output
{
"barcode_type": "QR code",
"content_type": "image/png",
"document_ref": "doc_6b7c8d9e0f1122336b7c8d9e0f112233",
"documents": [
{
"content_type": "image/png",
"document_ref": "doc_6b7c8d9e0f1122336b7c8d9e0f112233",
"filename": "qr-code.png",
"size_bytes": 1957,
"url": "/actions/core/serve-document/doc_6b7c8d9e0f1122336b7c8d9e0f112233?teamId=6512a1b2c3d4e5f600000001"
}
],
"encoded_text": "https://lodol.ai",
"filename": "qr-code.png",
"size_bytes": 1957,
"url": "/actions/core/serve-document/doc_6b7c8d9e0f1122336b7c8d9e0f112233?teamId=6512a1b2c3d4e5f600000001"
}