Markdown barcode generator
Generate a barcode by picking a symbology such as Code 128, EAN-13 or UPC, typing the value and setting the size and colours. It runs free in your browser with no sign-up, and the image goes straight into your document.
Barcode block syntax
A barcode block is a short list of key: value lines. The first line is the word barcode. After it, format is the symbology and value is the text or number to encode. The rest set the size, text and colours.
Basic barcode
Give a format and a value. Code 128 encodes any text or digits.
barcode
format: CODE128
value: MARKDOWN-128
A retail EAN-13
EAN-13 takes 12 digits and adds the 13th check digit for you.
barcode
format: EAN13
value: 5901234123457
Size, text and colour
Set the bar width and height, turn the human-readable text on or off with displayValue, and choose lineColor and background.
barcode
format: CODE39
value: MARKDOWN-39
width: 2
height: 80
displayValue: true
lineColor: #1d4ed8
background: #ffffff
margin: 10
Options
| Key | What it does |
|---|---|
format | The symbology (see the list below) |
value | The text or number to encode |
width | Width of a single bar, in pixels |
height | Bar height, in pixels |
displayValue | true or false — show the text under the bars |
fontSize | Size of that text, in pixels |
textAlign | left, center or right |
lineColor | Bar colour, e.g. #000000 |
background | Background colour, e.g. #ffffff |
margin | Quiet-zone margin around the code, in pixels |
Symbologies
Every symbology, with a value that works as an example.
| Format | Expects | Example value |
|---|---|---|
CODE128 | Any ASCII text or digits | MARKDOWN-128 |
CODE128A | Upper-case, digits, control characters | MARKDOWN128A |
CODE128B | Full ASCII, upper and lower case | Markdown 128B |
CODE128C | Digits only, even count | 12345678 |
EAN13 | 12 digits (13th check digit added) | 5901234123457 |
EAN8 | 7 digits (8th check digit added) | 96385074 |
EAN5 | 5 digits (add-on) | 12345 |
EAN2 | 2 digits (add-on) | 12 |
UPC | 11 digits (12th check digit added) | 036000291452 |
UPCE | 6 digits plus a check digit | 01234565 |
CODE39 | Upper-case, digits, - . $ / + % space | MARKDOWN-39 |
ITF | Digits only, even count | 1234567890 |
ITF14 | 13 digits (14th check digit added) | 1234567890123 |
MSI | Digits only | 1234567 |
MSI10 | Digits, mod-10 check digit added | 1234567 |
MSI11 | Digits, mod-11 check digit added | 1234567 |
MSI1010 | Digits, two mod-10 check digits added | 1234567 |
MSI1110 | Digits, mod-11 then mod-10 added | 1234567 |
pharmacode | A whole number from 3 to 131070 | 1234 |
codabar | Digits and - $ : / . +, optional A B C D ends | A40156B |
Something not working? Let us know.