Skip to main content

    Barcode Generator

    Make a barcode in your browser: pick a format, type the number or text, then download a PNG at the pixel size you choose, an SVG for print, or print it straight away. Every barcode is drawn as black bars on white with a light margin, whatever theme you use.

    Each format also has its own page with notes on its rules: the UPC barcode generator, the EAN-13 barcode generator, the Code 128 barcode generator, the Code 39 barcode generator and the ITF-14 barcode generator for cartons. For a web address or longer text, a scannable QR code for a URL is usually a better fit.

    For 2D codes, use the Data Matrix generator, the Aztec code generator or the PDF417 generator. Books have their own ISBN barcode generator, and the check digit calculator shows the full working for GS1 numbers and ISBNs.

    The number or text you type is encoded in your browser and is not sent to a server. See the privacy policy.

    Barcode format

    Letters, digits, spaces and keyboard symbols, up to 80 characters. Example: SKU-10442-B

    2 px
    100 px
    12 modules
    20 px
    PNG size

    Enter a valid value to see the PNG size.

    Scan test: print the barcode at the size you will use and test it with the scanner or app you will actually use before you print a batch.

    How it works

    1. Choose a format. Code 128 takes text, EAN-13, UPC-A, EAN-8 and ITF-14 take digits, and Code 39 takes uppercase letters, digits and a few symbols.
    2. Type your value or press Use example. Errors say what to change, and for EAN, UPC and ITF-14 numbers a panel shows whether the check digit was added, is valid or is wrong.
    3. Adjust the bar width, height, quiet zone and text size if you need to. The preview updates as you type.
    4. Pick a PNG size and download it, download the SVG, or press Print to print only the barcode.

    Which barcode format to use

    If a shop, carrier or software already tells you which format to use, follow that. Otherwise, this is how the formats here are usually used.

    • Code 128: letters, digits and symbols in a compact barcode, common on shipping labels and for internal stock codes.
    • EAN-13: the 13 digit retail barcode used for products sold in most countries.
    • UPC-A: the 12 digit retail barcode most used in the United States and Canada.
    • EAN-8: an 8 digit retail barcode for packs too small for an EAN-13.
    • Code 39: uppercase letters, digits and a few symbols, often used for asset tags and simple ID labels.
    • ITF-14: a 14 digit GTIN on outer cartons and cases that do not go through a retail checkout.

    A barcode is an image, not a registration

    This tool draws the bars for the number you enter. It does not register that number or link it to your company. For products sold in shops or on marketplaces, EAN and UPC numbers normally need to be licensed from GS1, the organisation that manages them, and retailers may check numbers against the GS1 database. A made-up or reused number can be rejected.

    Barcodes made here are fine for internal stock, labels, practice, testing and any system where you control the numbers.

    How check digits work

    EAN-13, UPC-A, EAN-8 and ITF-14 end with a check digit that lets a scanner catch a misread. Take the digits before it, multiply them by 3 and 1 in turn starting with 3 on the rightmost digit, add the results and subtract the total from the next multiple of ten. Enter one digit fewer than the full length and the tool adds the check digit for you. Enter the full number and it tells you whether the last digit is right, without changing your number.

    To see every multiplication laid out, or to check a whole list of numbers at once, use the check digit calculator.

    Size, quiet zone and file type

    • The quiet zone is the blank space either side of the bars. Scanners use it to find where the barcode starts, so keep it clear of text and label edges.
    • This tool adds 12 modules (narrow bar widths) of white on each side by default. That is above the GS1 minimums for EAN-13 (11 on the left, 7 on the right), UPC-A (9 on each side), EAN-8 (7 on each side) and ITF-14 (10 on each side).
    • The default bar width is 2 pixels per module and the bars are 100 pixels tall. The printed size matters more than the pixel size, so test at the size you will print.
    • SVG is a vector file that scales without blur, which makes it the better choice for print and design software. PNG is a fixed grid of pixels, so pick 2x or 4x if you need it larger.

    Pick a format

    Frequently asked questions

    Which barcode format should I use?

    Use the format the scanner, shop or software asks for. If you are free to choose, Code 128 suits text and internal codes, while EAN-13 and UPC-A are for retail products.

    Can I put these barcodes on products I sell in shops?

    The barcode image is fine, but the number matters. Retailers and marketplaces usually expect EAN or UPC numbers licensed from GS1, and may reject numbers that are not registered to your company.

    Does the tool add the check digit for me?

    Yes, for EAN-13, UPC-A, EAN-8 and ITF-14 when you enter one digit fewer than the full length: 12, 11, 7 or 13 digits. If you enter the full number, it checks the last digit and offers the corrected number if it is wrong.

    Should I download PNG or SVG?

    Choose SVG for print and design work, because it stays sharp at any size. PNG suits documents, web pages and label software that needs an image, and the size buttons show the exact pixel dimensions first.

    Is the barcode made on my device?

    Yes. The barcode is generated in your browser, and this tool does not send the value you type to a server.

    Why does the barcode stay black on white in dark mode?

    Scanners expect dark bars on a light background, and inverted barcodes often fail to scan. The preview, PNG and SVG are always black on white, so the file you download matches what you see.

    Related Tools