Guide
Numbered sample labels with a Data Matrix code
A small square code that holds the sample number, the number in plain letters beside or under it and the date, on small labels and rolls.
Updated
What goes on a sample label
The Sample label layout in the designer puts four things on each label: a Data Matrix code, the sample number in plain letters beside or under it, the date, such as 2026-11-20, and a short note, such as a plot or a batch.
The code holds the sample number and nothing else. Keep the details (where it came from, who took it) in your records, under that number: a short code prints bigger squares, and the label never changes when the details do.
A Data Matrix needs fewer squares than a QR code for the same short text, and one square of blank margin where a QR code needs four. Squares across, margin included, as the site’s engine draws them:
| In the code | Data Matrix | QR code |
|---|---|---|
| S-0001 | 14 | 29 |
| S261120-001 | 16 | 29 |
| SOIL-2026-PLOT03-0001 | 20 | 33 |
So in the same space, S-0001 as a Data Matrix gets squares about twice the size of a QR code’s.
Make the labels
Start the layout
The button below opens the designer with the Sample label layout on ½ × 1¾ inch labels, 80 per sheet. A label you were working on stays one Undo away.
Make it yours
Pick the note and type your own in its Text box, or press Delete. The number is
S-{{#|0000}}: the designer shows it as S-0001, and the print numbers the labels S-0001, S-0002 and so on. To change the S- in front, change both the code’s Value and the number line.Print
Open Print. Under How many, choose Fill the sheet or A set number of labels. Using a part-used sheet? Under Start at, tap the first unused label on the picture of the sheet.
How the numbering works
{{#}} is the label number: 1 on the first label of a print job, 2 on the next, and so on. After a bar, 0000 gives it four digits, so S-{{#|0000}} prints S-0001. Labels left empty at the start of a part-used sheet don’t take a number.
Every print job starts again at 1, and the designer has no setting for another first number. To carry on from S-0081, use a list (below), or the quick label tool: switch on Numbered series, set Start at to 81, Digits to 4 and In front to S-, and write {{Number}} in Text below to print the number in words too.
For numbers that don’t repeat from day to day, put the date in them: on 20 November 2026, S{{today|YYMMDD}}-{{#|000}} prints S261120-001, then S261120-002. A second print job that day starts again at 001, so print a day’s labels in one job.
Sample numbers from a spreadsheet
When the numbers already exist, keep a list with one row per sample, in Excel, a CSV file or Google Sheets. In the designer, choose Add a datalist and open it, or paste the rows; if the pop-up shows Column 1 and Column 2, switch on First row is a header. Until you change the label, the layout fills itself in; if you’ve changed it, choose Layouts, then Sample label again.
| Column | Where it goes |
|---|---|
| Sample (or Sample ID, Sample number, Sample no, Sample #, Sample code, Specimen, Specimen ID, Tube, Vial, ID, Code, Barcode, Serial or Serial number) | The code, and the number beside or under it |
| Note (or Notes, Comment or Comments, and without any of those, Name) | The note line |
With no column for the number, the labels are numbered S-0001, S-0002 and so on, and the designer says your list has no Sample column. A list with none of these columns at all fills nothing in, and the designer says so: every label also keeps the sample note, Plot 3, until you change it.
The spreadsheet can count for you: in Excel or Google Sheets, this formula in row 2, filled down, gives S-0081, S-0082 and so on.
="S-"&TEXT(ROW()+79,"0000")
Under How many, Every row of your datalist prints one label per sample, and Copies of each row prints two or three for two or three tubes. For a different number per row, add a Tubes column and choose Use a quantity column: an empty cell counts as 1, a 0 leaves the row out.
Sample numbers made only of digits, such as 000123, can lose their zeros in a spreadsheet: Leading zeros and long numbers shows how to keep them.
Your list is read in your browser and isn’t sent anywhere to make the labels.
The date
The date line is {{today|YYYY-MM-DD}}: the day you print, year first, such as 2026-11-20. It is the international standard form (ISO 8601), so it can’t be read the wrong way round, as 03/04/2026 can.
“Today” is the date on the computer or phone you print from, fixed once for each print job; the print step says which date it is.
- The day the samples were taken: open Label, find Dates, choose One date I choose under “Today” prints, and pick the day. It is kept with the label, so a reprint next week prints the same date.
- A date from your list: pick the date line and put your column’s name in place of
today, such as{{Collected|YYYY-MM-DD}}. A date such as 03/04/2026 could be 3 April or March 4, so it prints as it is in your list until you choose Day first or Month first under Label, Dates. - Another form:
{{today|D Mmm YYYY}}prints 20 Nov 2026. Dates, prices and numbers in fields has the others.
Small labels
On strips the code sits at the left with the words beside it; on squares and rounds the code is on top. On the smallest labels the note is left out first, then the date; the code and the number always stay. Measure your tubes, vials and caps first. Some small papers:
| Paper | Size | Per sheet |
|---|---|---|
| Return address labels, compatible with Avery® 5167 | ½ × 1¾ in | 80 |
| Mini labels, compatible with Avery® L7656 | 46 × 11.1 mm | 84 (A4) |
| Rectangle labels, compatible with OnlineLabels OL1930 | 1 × ½ in | 160 |
| Small labels on a roll | 1 × ½ in | A roll |
| Round labels, compatible with Avery® 94504 | ¾ in round | 80 |
| Labels on a roll, compatible with DYMO® 30330 | ¾ × 2 in | A roll |
Pick the code: under Printed size, One square says how big each square prints. Under 0.38 mm the designer calls the squares dense, under 0.25 mm too small to scan reliably, and for phone cameras it suggests 0.4 mm or more. That is advice, not a rule: you can still print.
On a label printer, set its dots per inch under Your label printer in Print, so the code is drawn on whole printer dots.
Before the first real sheet, open Print, then Line it up, and choose Print a test page. Print it on plain paper and hold it against a sheet of labels, up to a window. It never counts toward your labels.
Scanning
A Data Matrix needs a 2D scanner, one that reads with a camera: a laser scanner that reads only rows of bars can’t read it. Phones read it less readily than a QR code, so try the scanner app you will use.
If people will scan with their phones, a QR code may suit better: pick the code, press Change beside Type and choose QR Code. It needs more room (the table above).
Before you print the batch, print one sheet and scan a few labels with your own scanner. With a list, Check every row draws every label first and lists any that need a look.
Freezers, liquid nitrogen and alcohol
Not every label survives a freezer, liquid nitrogen or a wipe with alcohol. Labels are sold for each of those uses: choose one made for your printer and for what your samples go through.
Then test it before you label real samples: print one, stick it on the tube, vial or bag you use, put it through the same cold, bath or wipe, and scan it afterwards. On a thermal printer, direct thermal or thermal transfer matters too.
Your lab’s own rules
EncodeLabel prints the number, the date and the words you choose. What a sample label must show, and which labels and printers you may use, is for your lab, school, client or regulator to say, not this site: follow your lab’s own labeling rules. Patient samples in clinical labs are outside what this guide covers.
Reprint a damaged label
With no datalist, type the label’s number in place of the field, in the code’s Value and in the number line (S-0042 in both). Choose A set number of labels, set it to 1, and under Start at tap an unused label. The date is today’s unless you keep one under Label, Dates. Afterwards put S-{{#|0000}} back in both, or press Undo until it is back, so the next labels are numbered again.
For a whole sheet of a numbered run, print with the same How many and Start at as the first run (for example Fill the sheet with 3 sheets) and switch on Print only some sheets under Options: sheets 2 to 2 bring back the numbers sheet 2 had, S-0081 to S-0160 on ½ × 1¾ in labels.
Try it
Free for up to 100 labels a month. No account needed. Your labels are made in your browser.