How to Create a Barcode Online
An explanation of how to generate a barcode image online and why a genuine retail barcode still requires a registered GS1 company prefix.
Table of contents
A barcode works as the identity card of a product, allowing a scanner to read its details in an instant at the checkout, in the warehouse or on an e-commerce platform. Creating a barcode online is now very simple: you enter a string of numbers and the tool immediately generates a barcode image that you can download and print. There is, however, an important point that is often not explained clearly.
Generating a barcode image does not mean you have a valid barcode for selling products on the market. This is the main reason why many shop owners and new manufacturers are turned away by supermarkets and e-commerce platforms even though they have "created a barcode" successfully. This guide explains the difference and walks through the common ways of creating barcodes in Vietnam.
Internal barcodes compared with valid retail barcodes
Before you start, decide which type of barcode you need, because the two purposes are fundamentally different.
Barcodes for internal use and printing
These are barcodes you create yourself for internal management, for example:
- shelf labels in the warehouse;
- asset numbering;
- managing internal forms and tickets;
- stocktaking;
- internal price labels.
For these purposes you are free to make up your own numbering rules and use any online tool to generate the codes. It is enough that your own scanner can read them, and nobody checks whether they are unique worldwide.
Valid barcodes for selling on the market
When your product is sold in supermarkets, convenience stores or on e-commerce platforms, or is exported, the barcode must be a valid GS1 code. The right to use it is granted by the National Committee for Standards, Metrology and Quality through the National Barcode Centre (GS1 Vietnam). This type of code is tied to your unique GS1 company prefix (GCP), which ensures that it does not duplicate any other product in the world.
A free online tool cannot give you this. It only draws an image from the number you enter. It does not make that number unique, and it does not register the number to you. For a fuller explanation of how barcodes work, see our article on what a barcode is, its structure and types.
Common ways to create a barcode
There are three main ways to produce a barcode image. Each suits a different need and scale of business.
Using an online barcode generator
This is the fastest and most common method. Online generators work on a simple principle: you enter a number or a string of characters, and the system generates the matching barcode image for you to download.
Online tools usually support many formats, including one-dimensional (1D) and two-dimensional (2D) codes:
- EAN-13: the most widely used retail code in the world, with 13 digits, used for consumer goods.
- EAN-8: a shorter 8-digit version for small products such as sweets, lipsticks or narrow packaging.
- UPC-A and UPC-E: retail codes common in the North American market.
- Code 128, Code 39 and Code 93: codes that can encode both letters and numbers, often used in logistics and warehouse management.
- ITF-14: used on cartons and larger packaging units.
- QR Code and DataMatrix (2D): codes that can hold a URL, text or traceability information.
The general process for an online tool is straightforward:
- Choose the barcode type from the menu, for example EAN-13 or Code 128.
- Enter the number or character string in the data field. Some tools let you enter many lines at once or import them from an Excel file.
- Adjust the size (in pixels, centimetres or inches), the font of the numbers shown under the bars, the print margins and colours, and add a logo for QR codes.
- Generate the code and download it as a PNG, JPG, GIF or SVG file. SVG is a vector format that does not blur when enlarged, which makes it well suited to high-quality labels.
- Print it on A4 paper, with several labels per page, or directly on sticker paper with a label printer.
Creating barcodes in Excel
If you need to create many barcodes at once from an existing product list, Excel is a convenient tool. There are two approaches.
Using a barcode font: download and install a barcode font, such as a Code 128 or Code 39 font, on your computer. Then type the data in a cell and change the cell's font to the barcode font, so that the numbers or letters display as scannable bars. With Code 39, you normally need to add an asterisk at the start and end of the string, for example *12345*, so that the scanner recognises it.
Using functions or formulas: more complex fonts such as Code 128 need a formula, or a VBA macro, to calculate the encoded string and the check character before the font is applied. Many commercial font packages include a file of ready-made functions, so you only need to paste the formula in.
This method creates large numbers of codes very quickly for internal management. Take care with formatting, however, to avoid printing codes that cannot be scanned.
Using specialised software
For businesses printing large volumes of labels, specialised software such as BarTender or NiceLabel, or other professional barcode suites, is the most practical option. These programs let you:
- design complex labels combining barcodes, logos, prices and product information;
- connect directly to a database;
- select the printer and label size;
- print in batches.
Many label printer suppliers include this kind of software when you buy a printer.
Step by step: creating an EAN-13 barcode
EAN-13 is the code people ask about most, because it is the retail standard. These are the steps to create an EAN-13 image with an online tool:
- Open an online barcode generator and select the EAN-13 type.
- Enter the first 12 digits. They consist of the country prefix (for Vietnam, 893), followed by the company number and the product number.
- The system automatically generates the 13th digit, which is the check digit. You do not need to calculate it. If you enter all 13 digits and the last one is wrong, the tool will show an error or correct it.
- Choose the size, turn on the display of the numbers below the bars, and generate the code.
- Download the image, preferably as a high-resolution PNG or an SVG file, and add it to your packaging design.
About the check digit: the 13th digit is calculated with a weighting algorithm. The digits are multiplied alternately by 1 and 3 and added together, and the check digit is the difference between that total and the next multiple of 10. The key point is that almost every barcode tool generates this digit for you, so you only need to enter the first 12 digits correctly. Entering a correct number, however, does not make that number yours, which is the registration issue explained below.
To understand what the first three digits mean, see our list of country barcode prefixes.
When a temporary code is enough and when you must register a GS1 code
This is the most important section, because it determines whether your products can be sold smoothly.
When a self-made code is enough
- Managing your warehouse, assets and internal operations.
- Marking products on the production line and on production slips.
- Small-scale sales in your own shop, using your own scanner.
- Printing QR traceability labels or promotional labels that do not need to follow the GS1 standard.
When you must register a GS1 code
- Placing goods in supermarkets, retail chains and convenience stores, such as Co.opmart, WinMart or Bach Hoa Xanh. They require a valid GS1 barcode and a certificate of the right to use it.
- Selling on major e-commerce platforms, where many product categories require a valid GTIN or EAN code.
- Exporting, because foreign partners need the code to return the correct information and to be unique worldwide.
- Building a brand properly and proving the genuine origin of your products.
In these cases you must register to be granted your own GS1 company prefix. The procedure and documents are set out in our full guide to registering a GS1 barcode for a business, and the costs in our article on GS1 barcode registration and annual maintenance fees. Once the prefix is granted, you assign individual product numbers within it and only then use a generator to produce the printable image.
Risks of inventing a barcode for retail sale
Because online tools make codes so easy to create, some people simply make up a number starting with 893 and print it on their packaging. This is a serious mistake with several risks:
- Duplicating another product's code: the number you invent may already have been assigned to another business. When it is scanned, the supermarket's system shows an unrelated product, causing problems with payment and stock records.
- Rejection by retailers: supermarkets and e-commerce platforms check codes against the GS1 database. If the code does not belong to you or does not exist, the goods are rejected at the approval stage.
- Legal risk: using an unlicensed code or misrepresenting origin may lead to penalties and harm the reputation of your brand.
- No traceability: customers and partners lose confidence when the origin of a product cannot be traced.
In short, making up a code for internal use is acceptable, but you should never do it for products sold on the market.
Frequently asked questions
Can a free online barcode be used to sell products in supermarkets?
No. An online tool only creates a barcode image from the number you enter and does not register that number to you. To sell in supermarkets, you must have an official GS1 code that has been granted to your business.
Do I have to calculate the EAN-13 check digit myself?
No. Most barcode generators automatically calculate and add the 13th digit. You only need to enter the first 12 digits correctly.
Could a barcode I create myself duplicate someone else's?
Yes. If you make up the number yourself, it may well duplicate a product that has already been assigned that code. Only GS1 registration gives you your own number range, which is guaranteed not to duplicate any other code worldwide.
Is it difficult to create barcodes in Excel?
Not if you only use a Code 39 or Code 128 font for internal management: install the font, type the data and change the font. For codes that need a complex check digit, use the formulas or macros supplied with the font package.
Which file format should I download for printing?
Choose a high-resolution PNG or an SVG vector file. SVG does not blur when enlarged, so labels print sharply and scanners are less likely to fail because of blurred bars.
Can a QR Code replace an EAN-13 barcode?
Not entirely. QR Codes are suited to traceability, links and marketing, while standard retail checkout still uses EAN-13 or UPC codes. Many products now carry both.
How much does GS1 barcode registration cost?
The cost consists of an initial registration fee and an annual maintenance fee, which depend on the size of the business and the number of products. Our article on GS1 registration and annual maintenance fees sets out the details.
How LTV Law helps
Creating a barcode image online takes only a few steps, and it is ideal for internal management, warehouses and quick printing. A barcode image, however, is not a valid barcode for selling on the market. To supply supermarkets, sell on e-commerce platforms or export, you need an official GS1 code with a unique number range.
LTV Law handles the full GS1 barcode registration procedure, from advice and the online application to the grant of the right to use the barcode. Official information is also available at gs1.org.vn. To get started, contact our team.
This article is for general information only and does not constitute legal advice.
Related insights
First-to-File Trademark Risks in Vietnam for Foreign Brand Owners
17 July 2026
Intellectual PropertyPCT National Phase and Paris Route for Patents in Vietnam
17 July 2026
Intellectual PropertyIndustrial Design Registration in Vietnam for Foreign Firms (2026)
16 July 2026
Intellectual PropertyEnforcing Intellectual Property Rights in Vietnam in 2026
16 July 2026
Need help protecting your rights in Vietnam?
LTV Law acts as your licensed local representative — from filing to enforcement.