Barcode Generator

Create Code 128, EAN-13, UPC-A and EAN-8 barcodes in your browser. Enter a value, check the preview, and download the barcode as PNG, JPG, SVG or PDF.

Barcode type

Choose the barcode type you want to create.

Barcode value

Printable ASCII characters, up to 80 characters. Spaces are kept as typed.

Options

Choose how the barcode appears in the preview and in downloads.

Barcode preview

The preview shows the barcode at its module geometry. Test printed barcodes with the scanner you plan to use.

Enter a value to see the barcode here.

Export & Download

PNG and SVG keep bar edges sharp. JPG is a compression format, offered for compatibility. Use PNG where crisp edges matter.

How it works

Choose a barcode type

Select Code 128, EAN-13, UPC-A or EAN-8. Code 128 is selected by default.

Enter the value

For EAN-13, UPC-A and EAN-8 you can enter the digits without the check digit, and it is calculated for you. A complete number is verified instead.

Read the status line

The status line below the value confirms whether a check digit was calculated or verified, or explains what needs correcting.

Choose the output and download

Show or hide the value under the bars, choose PNG, JPG, SVG or PDF, and download the file. Where your device supports it, you can also share the PNG.

What the Barcode Generator covers

The generator supports four barcode types and four download formats. Everything runs in your browser.

Four barcode types

Code 128 for general text, EAN-13 and UPC-A for product numbers, and EAN-8 for small products.

Check digits calculated or verified

EAN-13, UPC-A and EAN-8 calculate the check digit from the body digits, or verify it in a complete number. A mismatch is reported and never repaired silently.

Optional human-readable value

Show the encoded value as text under the bars, or hide it for a bars-only graphic.

PNG, JPG, SVG and PDF

Raster and vector files built from the same barcode geometry. PDF keeps the bars as vector shapes.

Share PNG where supported

On browsers and devices with file sharing, the PNG is passed to the system share sheet. fourwww does not upload it.

Barcode types

Each type has its own input rules. Choose the type that matches the system that will read the barcode.

Code 128

A general-purpose barcode for letters, digits and common symbols, using Code Set B. This generator accepts printable ASCII text up to 80 characters.

EAN-13

A 13-digit barcode used to identify retail products. Enter 12 digits to calculate the check digit, or 13 digits to verify it.

UPC-A

A 12-digit barcode used on retail products. Enter 11 digits to calculate the check digit, or 12 digits to verify it.

EAN-8

An 8-digit barcode for small products where a longer code does not fit. Enter 7 digits to calculate the check digit, or 8 digits to verify it.

Check digits and barcode geometry

Two technical details explain most barcode results: the check digit, and the way bars are drawn from modules.

What a check digit does

A check digit is calculated from the other digits. It helps a system detect many single-digit entry errors. It does not show that a number is registered or belongs to you.

Bars and modules

Every bar and space is a whole number of modules, the narrowest element. The preview and downloads keep these proportions, so the barcode is never stretched to fill a frame.

Quiet zones

Each barcode type needs clear space on its left and right. The generator adds the minimum quiet zones around the bars, and they are kept in every export.

Human-readable text

The value can be printed under the bars so people can read it. The text is placed below the bars and never overlaps them.

The check digit confirms the digits you entered, not where the number came from. Use only numbers you are entitled to use.

Guidance for scanning and printing

Scanning depends on print quality, contrast, size, the scanner and the lighting. These checks help avoid common problems.

Keep the quiet zones clear

Do not place text, lines or images close to the left and right edges of the barcode.

Use strong contrast

Dark bars on a light background work best. Print in a single dark colour and avoid light colours that weaken the bars.

Do not stretch the barcode

Keep the file proportions. Scaling it unevenly can make bars too narrow or too wide to read.

Choose the format for the job

Use SVG when the barcode must scale. Use PNG for sharp raster output. JPG is lossy and can soften bar edges, so prefer PNG or SVG where scanning matters.

Test the final barcode

Print the barcode at the size you will use and scan it with the device and software your workflow relies on.

Frequently asked questions

Does this create a registered UPC or EAN?

No. The generator encodes the number you supply. It does not allocate, register or verify a GTIN, UPC or EAN with GS1.

What does the check digit change?

Entering 12 digits for EAN-13 adds the 13th digit. Entering 13 digits checks the last digit. An incorrect check digit is shown as an error, and the value is not changed.

Which format should I download?

PNG and SVG keep the bars sharp, and SVG scales without loss. JPG is offered for compatibility, and PDF is useful for documents. Test the result before relying on any format.

Can I share the barcode?

Where your browser and device support file sharing, Share PNG opens the system share sheet with the PNG file. The value is not included as text.

Does this guarantee that the barcode will scan?

No. Scanning depends on print quality, size, contrast, the scanner and the lighting. The generator creates the barcode from your input, but it cannot test it in your workflow.