Skip to content
ToolsOnDuty - free online tools
Business ToolsNovember 6, 2026

How to Generate Barcode Images and Verify the Encoded Value

Create a CODE128 demo label and an EAN-13 checksum example, inspect actual PNG and SVG exports, and separate generation from identifier allocation.

By ToolsOnDuty Editorial Team

CODE128 demonstration barcode for DEMO-BOX-001 with its raster dimensions and export controls.

A barcode image represents a value in a selected symbology; it does not create a product record or automatically allocate a globally recognized identifier. Choose the value and format according to the receiving system, then verify both the generated content and its real printing or scanning conditions.

This guide uses the ToolsOnDuty Barcode Generator with two clearly fictional examples. We inspected a CODE128 PNG and an EAN-13 SVG, checked the EAN label's appended check digit and tested an invalid value. We did not perform a physical scanner or printer verification, so this guide does not claim production scan certification.

Select a format appropriate to the receiving workflow

Open Barcode Generator and review Format before entering a value. CODE128 is a flexible starting point for many ordinary text-and-number labels; our sample is DEMO-BOX-001. Other choices have different character or numeric requirements, so do not assume every string works in every format.

A syntactically valid symbol does not establish that a warehouse, retailer or application recognizes the identifier. Confirm its expected symbology and allocation rules. Changing format does not convert an existing product identifier into a newly authorized one. These demo values are for testing only, not assigned product identifiers or claims about a real inventory item.

Generate the CODE128 sample with clear contrast

Select CODE128, enter DEMO-BOX-001 and keep black bars on a white background. Our controls used bar width 2, bar height 100, quiet-zone setting 16 and label size 18, with text displayed underneath. The preview and status identified a valid CODE128 rendering.

The complete raster output was 366 by 152 pixels, not merely the 100-pixel bar height. Labels and margins also contribute to the image bounds. Avoid scaling or trimming those bounds blindly when preparing a print layout, and review the visible human-readable value alongside the symbol.

Valid CODE128 demo label with black bars, white background and a 366 by 152 pixel raster size.
Actual CODE128 settings and preview. DEMO-BOX-001 is a fictional internal-label example.

Inspect actual PNG and SVG exports

Download PNG produced a 3,953-byte raster image matching the 366 by 152 dimensions. We opened it and checked the visible value. PNG can be convenient for a fixed-size digital layout, but enlarging it carelessly can blur or unevenly scale bars.

SVG is a vector output suited to workflows that support scalable barcode graphics. The EAN example's actual SVG was 2,318 bytes with a 246 by 152 view box. Vector output still needs a correct final size, quiet area and printer setup; it is not a substitute for checking the resulting label with the intended equipment.

Understand the EAN-13 check-digit demonstration

For the tested EAN-13 workflow, we entered the twelve-digit base 123456789012. The generated human-readable label was 1234567890128, adding check digit 8. We inspected its SVG text fragments and verified the complete combined label.

The weighted sum of the base digits is 92, giving check digit (10 minus 92 modulo 10) modulo 10, or 8. That mathematical check helps detect some input errors, but it does not prove product identity or legitimate identifier allocation. Follow the applicable GS1 or trading-partner requirements for real external product identifiers.

EAN-13 demo input 123456789012 rendered with appended check digit 8 in its human-readable label.
Actual EAN-13 checksum example. The fictitious base is not an assigned retail-product identifier.
text
Demonstration base: 123456789012
Weighted sum: 92
Check digit: 8
Rendered EAN-13 label: 1234567890128

Check what Copy encoded value actually supplies

The Copy encoded value button supplied DEMO-BOX-001 for the CODE128 sample. In the EAN demonstration it supplied the entered twelve-digit base, not the thirteen-digit label containing the appended check digit. We explicitly checked that distinction.

Do not assume a button label confirms which identifier form a downstream database expects. Compare the input, generated human-readable label and required stored value. If a workflow requires a complete check-digit-bearing number, verify that representation rather than pasting the input base without reviewing it.

Preserve quiet zones and verify real scan conditions

Quiet zones are clear areas around the symbol that help a reader distinguish it from surrounding marks. Do not crop the output tightly to the outer bars or place adjacent text into those areas. Pixel values in the browser are not automatically equivalent to a physical millimeter specification after printing.

Use a suitable contrast, size and print quality for the actual symbology and equipment. Test a printed sample with the intended scanner before bulk production, and verify the returned value in the receiving system. Our software checks of dimensions and labels do not establish that every resized, compressed or printed version will scan reliably.

Handle validation errors without inventing an identifier

We entered a full EAN example ending in an incorrect check digit and observed an invalid-value message with download actions disabled. Correct the value and format rather than changing digits merely to get a valid-looking symbol. A checksum passing is not proof that the value belongs to your product.

Keep the original identifier source, required format and approved allocation process with real records. Generating a barcode does not create a GS1 registration, legal ownership or a warehouse integration. Review any private information before encoding it, and remember that a visible barcode can be read by anyone with suitable equipment.

Apply the steps from this guide directly in your browser.

Frequently asked questions

Does generating an EAN symbol register a product identifier?

No. Generation and check-digit arithmetic are separate from legitimate allocation, registration and trading-partner recognition.

Does Copy encoded value include the appended EAN check digit?

Not in the tested twelve-digit workflow. It copied the entered base, while the rendered label included the thirteenth digit.

Was a real printer or physical scanner tested here?

No. We verified software output, dimensions and label values. Test the actual printed sample and receiving system before bulk use.

Can I remove the blank area around the bars?

Do not casually trim the quiet zones. Preserve the required clear area and verify the final physical layout for the chosen symbology.