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
formatThe symbology (see the list below)
valueThe text or number to encode
widthWidth of a single bar, in pixels
heightBar height, in pixels
displayValuetrue or false — show the text under the bars
fontSizeSize of that text, in pixels
textAlignleft, center or right
lineColorBar colour, e.g. #000000
backgroundBackground colour, e.g. #ffffff
marginQuiet-zone margin around the code, in pixels

Symbologies

Every symbology, with a value that works as an example.

Format Expects Example value
CODE128Any ASCII text or digitsMARKDOWN-128
CODE128AUpper-case, digits, control charactersMARKDOWN128A
CODE128BFull ASCII, upper and lower caseMarkdown 128B
CODE128CDigits only, even count12345678
EAN1312 digits (13th check digit added)5901234123457
EAN87 digits (8th check digit added)96385074
EAN55 digits (add-on)12345
EAN22 digits (add-on)12
UPC11 digits (12th check digit added)036000291452
UPCE6 digits plus a check digit01234565
CODE39Upper-case, digits, - . $ / + % spaceMARKDOWN-39
ITFDigits only, even count1234567890
ITF1413 digits (14th check digit added)1234567890123
MSIDigits only1234567
MSI10Digits, mod-10 check digit added1234567
MSI11Digits, mod-11 check digit added1234567
MSI1010Digits, two mod-10 check digits added1234567
MSI1110Digits, mod-11 then mod-10 added1234567
pharmacodeA whole number from 3 to 1310701234
codabarDigits and - $ : / . +, optional A B C D endsA40156B