English Čeština Deutsch Magyar Français Español Português (Brasil)

Barcode Generator

16 min read Open tool

On this page

Create a barcode

  1. Open Barcode Generator. Choose Code 128 from the type list. On a phone, open Type first.

  2. Enter BOX-001 in Input data. Wait for the barcode to appear under Live preview.

  3. Choose PNG, then Download. Find the image in your browser’s downloads list.

Code 128 accepts letters, numbers and common keyboard symbols, so it works for this example. For real labels, use the format required by your scanner or stock system.

The numbers in this guide are examples. Generating a barcode does not assign an official product number to your business. Use the number your retailer or organization has assigned. GS1 explains EAN and UPC product identifiers.

Create a barcode

Find the barcode type you need

On a phone, choose Type to open the list. Select a format to return to the editor.

Type a name such as EAN-13 in the search field, or choose a category. The Numbers only, Letters + numbers, 2D, Postal and GS1 filters narrow the list. All types clears the category and filters. Clear the search field too to see every type.

The small preview beside the list describes the type under your pointer or keyboard focus. Select that type to use it. After switching, check Input data again because each type accepts different characters and lengths.

Use the question mark beside the input status to check the selected type’s rules. A check digit is calculated from the other digits to help detect mistakes in a number. It does not prove that the number is registered or belongs to a particular product.

Find the barcode type you need

Pin your usual types

Move over a type and choose Pin. Pinned types appear at the top. On a phone, open Type and tap the pin icon. Choose Unpin to remove one. Pins stay in this browser and are included when you export all data.

Pin your usual types

Enter retail and product numbers

TypeWhat this tool accepts
EAN-1312 digits. The tool adds the thirteenth check digit. Example: 400638133393.
EAN-87 digits. The tool adds the eighth check digit. Example: 9638507.
UPC-A11 digits. The tool adds the twelfth check digit. Example: 03600029145.
UPC-E6 compressed digits, or a valid 8-digit UPC-E number beginning with 0 or 1. Seven digits are not accepted. Example: 012345.
ISBN12 digits, or a valid 13-digit ISBN. It must begin with 978 or 979. Do not include hyphens. Example: 9780306406157.
EAN-2Exactly 2 digits for an add-on symbol. Example: 53.
EAN-5Exactly 5 digits for an add-on symbol. Example: 52495.
ITF-1413 digits. The tool adds the fourteenth check digit. Example: 1001234500001.
GS1 DataBar13 digits. The tool adds the check digit and creates the Stacked form. This renderer accepts a product number only. Example: 0123456789012.

For EAN-13, EAN-8, UPC-A and ITF-14, leave off the final check digit when typing. If you already have a full number, keep a copy of it and compare it with the completed number in the preview. ISBN and UPC-E have the separate rules shown above.

Enter text, stock codes and postal data

TypeWhat this tool accepts
Code 1281 to 80 printable ASCII characters. These are unaccented letters, digits, spaces and common keyboard symbols. Example: BOX-001.
Code 391 to 43 characters. A to Z, digits, spaces and - . $ / + %. Lowercase becomes uppercase. Example: BOX-001.
Code 931 to 47 characters from the same set as Code 39. Lowercase becomes uppercase. Example: BOX-001.
ITFAn even number of digits, at least 2. Keep any leading zeros your system requires. Example: 123456.
CodabarStart and end with A, B, C or D. Between them, use digits or - $ : / . +. Example: A123456B.
MSI PlesseyDigits only. Example: 123456.
PharmacodeA whole number from 3 to 131070, without leading zeros. Example: 1234.
Code 11Digits and hyphens. Example: 123-45.
PDF417Text. Up to 1,850 ASCII characters, or 1,108 UTF-8 bytes when using other characters. Accented letters and emoji can use several bytes each. Example: Parcel 001.
Royal MailUppercase letters A to Z and digits. Example: EC1A1BB.
USPS PostnetExactly 5, 9 or 11 digits. Example: 12345.
USPS IMbExactly 20, 25, 29 or 31 digits. Use the identifier supplied for your mailing workflow. Example: 01234567094987654321.
TelepenPrintable ASCII characters. Example: ABC123.
PlesseyHexadecimal characters, meaning digits 0 to 9 and letters A to F. Example: ABC123.

Choose the format your receiving system asks for. Two different barcode types can contain the same text and still be incompatible with that system.

Create several barcodes

  1. Choose one barcode type for the batch.

  2. Enter each value on a separate line in Input data. Paste a column from a spreadsheet if you already have a list.

  3. Review the previews. Correct any line marked invalid. Empty lines are ignored.

  4. Choose an export format, then Download.

Every line uses the same barcode type, colors, size and text settings, and duplicate lines create duplicate barcodes. The preview shows eight codes at a time, with page arrows to reach the rest.

Select a preview to enlarge it. Choose Back to barcodes, the close button inside the preview, to return to the grid. Edit values in Input data. Opening a preview does not remove the other codes from the download.

One invalid line blocks the whole batch download. Fix that line or delete it before exporting. For PNG, JPG or SVG, the tool downloads a ZIP containing one file per line. PDF and DOCX put the barcodes in one document.

Create several barcodes

Import a CSV file

  1. Save your spreadsheet as CSV. Give the barcode column the heading value.

  2. Choose Import CSV above Input data, then select the file.

  3. Check the imported values and preview before downloading.

name,value
First box,BOX-001
Second box,BOX-002

The importer uses the column named value and ignores other columns. Without a value heading, it uses the first column of every row, including the first row. Use a value heading when your spreadsheet has column names.

Comma, semicolon and tab separators are accepted. Quoted cells can contain separators, but a barcode value cannot contain a line break. Empty values are skipped.

Keep a copy of your current Input data before importing another file, because a successful import replaces it. If the CSV is empty, malformed or contains a value with a line break, the import is rejected and your existing input stays in place.

Import a CSV file

Create a numbered range

  1. Choose Range below Input data.

  2. For a Code 128 example, set Prefix to BOX-, Range from 1 to 5, Step to 2 and Zero padding to 3 digits. Leave Suffix and Mask empty.

  3. Choose Fill input. The editor now contains BOX-001, BOX-003 and BOX-005 on separate lines.

ControlWhat it does
Prefix and SuffixAdd characters before or after each number.
RangeSets the first and last number. The last number is included if the step reaches it.
StepSets the gap between numbers. Use 1 for every number or 2 for every other number.
Zero paddingAdds zeros before short numbers. Four digits turns 7 into 0007.
MaskPlaces the number inside a pattern. SKU-####-A turns 7 into SKU-0007-A. Each # reserves a digit. Mask replaces Prefix, Suffix and Zero padding.
LengthAppears for postal formats that accept several fixed lengths. Choose the length your data requires.

The available fields change with the barcode type. Fixed-length numeric formats add leading zeros to the required length. ISBN starts with 978 by default. Codabar supplies start and end letters. Pharmacode uses its allowed numeric range.

Fill input replaces the existing list. Editing Range settings does not change that list until you choose Fill input again. Use whole numbers and a positive step. A range can contain up to 9,999 values. Check the resulting lines before printing.

Create a numbered range

Change the colors

Choose Colors. Bar color changes the bars, Background changes the area behind them and Text color changes the printed value. Select a swatch or enter a six-digit hex color such as #1A1A1A. The curved arrow restores that color’s default.

Black bars on a white background are the safest starting point. Keep the bars dark and the background light. A label that looks clear on a screen can still fail under a scanner’s light. Test it with the scanner you will use.

Text color is available when Show text below barcode is on. Changing the website’s light or dark appearance does not change the barcode’s export colors.

Change the colors

Set bar width, height and rotation

Choose Size. Use the sliders or type a number beside them. The preview updates after each change.

ControlWhat it changes
Bar widthThe width of the narrow bars, from 1 to 4. Increasing it makes the barcode wider.
HeightThe bar height, from 20 to 200 px.
MarginClear space around the symbol, from 0 to 30 px. Do not remove the clear space required by your barcode standard.
RotationTurns the whole barcode to 0°, 90°, 180° or 270°, including its text.

These settings describe the generated artwork, while the final printed size also depends on export and print settings. When placing the barcode in another document, keep its proportions and leave the blank edges intact.

Set bar width, height and rotation

Show or hide the printed value

Choose Text. Turn Show text below barcode on to print the value with the bars. Set Font size from 8 to 24 px. Turn it off to export the bars without that line of text.

Hiding the printed value does not remove it from the barcode. To change what the barcode contains, edit Input data.

Show or hide the printed value

Add GS1 fields to Code 128

  1. Select Code 128, then turn on GS1 above Input data.

  2. Enter the field numbers in parentheses, followed by their values. The example below contains a product number, an expiry date and a batch number.

  3. Read the field breakdown below the input. Correct any rejected field before downloading.

(01)06141410000366(17)271231(10)ABC123
Example partMeaning
(01)06141410000366A 14-digit GTIN, including its check digit. This example is for testing.
(17)271231An expiry date in YYMMDD order. Here it means 31 December 2027.
(10)ABC123A batch or lot number.

The field numbers are called Application Identifiers, abbreviated AI. The parentheses help you enter and read them. The encoder adds the separators needed inside the barcode.

Supported identifiersField
00, 01, 02SSCC, GTIN and Content GTIN.
10, 20, 21, 22Batch or lot, variant, serial number and CPV.
11, 13, 15, 17Production date, packaging date, best before and expiry date.
30, 37Count and quantity.
240, 241, 250Additional ID, customer part number and secondary serial.
310n, 311n, 320nNet weight in kilograms, length in meters and net weight in pounds. Replace n with 0 to 5 for the number of decimal places.
390n, 391n, 392nAmount payable, amount with currency and price. Replace n with the number of decimal places.
400Customer order number.
410, 411, 412, 414Location identifiers for shipping, billing, purchasing and physical location.
421Postal destination.
8004, 8005, 8006GIAI, price per unit and ITIP.
8008, 8018, 8020Production date and time, GSRN service recipient and payment reference.

Use the identifiers and field rules required by the organization receiving the code. This helper does not cover every GS1 Application Identifier or replace a GS1 compliance check. Unknown or invalid fields block export.

For EAN, UPC, ITF-14 and GS1 DataBar, the GS1 button shows product-number guidance. Enter the digits required by that type. These formats do not accept a Code 128 string containing several fields.

Add GS1 fields to Code 128

Choose a download format

FormatOne barcodeSeveral barcodes
SVGA vector image that stays sharp when resized.A ZIP of SVG files.
PNGAn image suitable for inserting into documents.A ZIP of PNG files.
JPGAn image with JPEG compression. Prefer PNG or SVG when you need crisp bar edges.A ZIP of JPG files.
PDFAn A4 document containing the barcode as an image.One document with the barcodes, or a label sheet when Label sheet is on.
DOCXA Word document containing the barcode as an image.One Word document containing the barcodes.

Resolution appears for PNG, JPG and DOCX. Set it from 72 to 600 DPI. Increasing it adds image pixels without changing the encoded value. SVG keeps vector bars. PDF and DOCX contain raster images.

The downloaded files appear in your browser’s downloads list. Large batches take longer to prepare. Wait for the download to finish before closing the page.

Raster export rounds the bar width up to whole pixels to keep edges sharp. The exported size may be slightly larger than the selected resolution suggests. Check the dimensions shown before downloading.

Choose a download format

Print a sheet of labels

  1. Enter at least two values, one per line. Choose PDF.

  2. Turn on Label sheet.

  3. Choose the template that matches your label paper, or choose Custom….

  4. Choose Download. Open the PDF and print a test page at Actual size or 100% scale.

TemplateLabels per page
Avery 516030 labels in 3 columns and 10 rows.
Avery 516310 labels in 2 columns and 5 rows.
A4 24-up24 labels in 3 columns and 8 rows.
A4 65-up65 labels in 5 columns and 13 rows.

Hold the test page against the label sheet to check alignment before using adhesive labels. Disable printer options such as Fit to page if they resize the sheet.

Custom fieldWhat to measure
Page width (mm) and Page height (mm)The paper’s width and height in millimeters.
Columns and RowsThe number of labels across and down.
Label width (mm) and Label height (mm)One label’s width and height.
Top margin (mm) and Left margin (mm)The distance from the paper’s edge to the first label.
Horizontal gap (mm) and Vertical gap (mm)The horizontal and vertical space between labels.

The grid must fit on the page before you can download it. Each barcode is fitted inside its label without stretching, and additional pages are added when needed. Test the printed result, especially with long barcodes that may become too small to read on a narrow label.

Label sheet applies to batch PDF exports. Choosing PNG, JPG, SVG or DOCX uses the normal export for that format.

Print a sheet of labels

Check the barcode

  1. Download a PNG of the barcode.

  2. Choose Scan to verify, then Choose barcode image and select the PNG. On a desktop with an available camera, you can also scan a printed code.

  3. Compare Scanned value with Expected value. Barcode value matches means the decoded value agrees with the current input. Barcode value does not match means the value differs. The reader also reports when the image uses a different barcode format.

In a batch, Expected value comes from the first nonempty input line. To check a different barcode, copy its value into Input data on its own first. Opening its preview does not change the expected value.

With empty input, the scanner reports the value it detects without comparing it. Scan again restarts the check. If camera access is unavailable, use Choose barcode image. Phones and tablets use the image upload view.

The built-in reader cannot read every format the generator creates. MSI Plessey, Code 11, Plessey, Telepen, postal codes and Pharmacode need a reader that supports their format. Use your receiving system’s scanner for those labels.

A successful scan checks the encoded data. It does not certify print quality or compliance with a retailer’s rules. Also test the final label at its printed size with the scanner that will read it.

Check the barcode

Save settings and reopen previous work

  1. Choose Save preset beside Live preview, or Presets near the page title.

  2. Enter a Preset name, up to 30 characters, then choose Save preset.

  3. To restore it, open Presets and select the saved row. If asked, confirm Replace.

A preset saves the selected type, input values and appearance settings. It does not save every export choice or the GS1 switch. Check GS1, format, resolution and label-sheet settings after restoring it.

History records completed downloads, including batches, and keeps the latest 50 entries. Select a row to restore its input, type and appearance. Use Previous and Next when the list spans more than one page.

The delete button removes a saved row. Clear all removes the entire list after confirmation. Presets and history stay in this browser. Export a MORELESS backup before clearing site data or moving to another browser.

Save settings and reopen previous work

Use the keyboard and fullscreen preview

ActionKeys
Move to the next control Tab
Move to the previous control Shift + Tab
Open a larger batch previewFirst use Tab to select a barcode in the batch. Enter or Space
Move between barcode typesOpen the type picker first. Arrow keys
Choose a barcode typeIn the type picker. Enter
Expand the previewIf your system uses F11 for another action, choose Fullscreen in the tool. F11
Close the open viewCloses History, Presets or Scan to verify, or leaves fullscreen. Esc

On a phone, Download and Scan to verify are in the bottom action bar. More contains Save preset, History and Fullscreen. Open Barcode options when the settings are collapsed. Use the same input and export controls as on a larger screen.

Fix an input or scanning problem

ProblemWhat to do
Download is unavailableRead the input error. Check the selected type, allowed characters and number of digits. In a batch, fix every invalid line.
A retail number has too many digitsCheck whether you included the final check digit. EAN-13 expects 12 input digits, EAN-8 expects 7, UPC-A expects 11 and ITF-14 expects 13.
Leading zeros disappeared in the spreadsheetStore the spreadsheet cells as text before saving CSV. Recheck the number of digits after import.
The bars appear but the scanner rejects themConfirm the required barcode type and value. Restore dark bars on a light background, preserve the margin and test a larger printed size.
A label sheet does not alignChoose the exact paper template, check the printer’s scale and test on plain paper. For Custom…, measure the margins and gaps again.
Verify cannot read the imageUse a sharp image that includes the entire barcode and its clear edges. Check that the built-in reader supports the format.
A restored preset behaves differentlyCheck the GS1 switch and export settings. They are separate from the saved appearance.

Image preview

Confirm