Markdown barcode generator
Generate a barcode from a value in your browser. Pick a symbology, type the value, and set the size and colours. 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.
You write
barcode
format: CODE128
value: MARKDOWN-128
You get
A retail EAN-13
EAN-13 takes 12 digits and adds the 13th check digit for you.
You write
barcode
format: EAN13
value: 5901234123457
You get
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.
You write
barcode
format: CODE39
value: MARKDOWN-39
width: 2
height: 80
displayValue: true
lineColor: #1d4ed8
background: #ffffff
margin: 10
You get
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 |