Various barcode generation tools (JAN/ITF/Code39 compatible) | ZeroTools

You can generate 1D barcodes such as JAN codes (EAN-13/8), Code39, ITF, and Codabar from input values, and save them as PNG and SVG.

Loading tool interface...

Local Browser Processing and Network Communication Notice

This tool's processing operates locally within your browser. Standard site assets, analytics, and advertisements may communicate separately. There are no guarantees.

ZeroTools: Browser Processing & Privacy

ZeroTools focuses on tools that process input on your device. Check each tool’s scope and limitations before use.

Processing and privacy policy
Chapter 1

Supported 1D Barcodes and Basic Operations

The barcode generator tool is a page that draws a 1D barcode from input strings or numbers and saves it as a PNG or SVG image. The selectable formats are five types: EAN-13 and EAN-8 used for JAN, Code39 which can handle alphanumeric characters, general ITF which pairs numbers two digits at a time, and Codabar (NW-7).

When you select a format, an example of that format is entered into the input field, so please replace it with the value you actually want to use.

If the input content meets the conditions of the format, it will preview a black bar on a white background and an optional text label.

If the value is invalid, an error is displayed, and an image of that value cannot be saved.

This page does not have QR code creation, Code128 high-density encoding, or ITF-14 layouts specifically for GS1. General ITF is a method for encoding any even number of digits, and is not a feature for adding bearer bars or print verification for ITF-14 with a fixed 14-digit GTIN.

Even with the same word "barcode," the standard and numbering system expected by the reader will differ depending on the application.

First, check the format specified by the intended destination, and select it if it matches these five formats. Note that this tool is not certified to fully comply with all five standards.

If you need a 2D code, use a separate QR creation tool. It only generates images and is not a service to check the validity of numbers or product registration status.

Chapter 2

JAN/EAN Check Digits and Number Meanings

EAN-13 accepts 12 or 13 half-width numbers, and EAN-8 accepts 7 or 8 half-width numbers. The last digit for each is a check digit.

If you enter 12 or 7 digits, it calculates a value that makes the sum of alternating weights of 3 and 1 from the right edge plus the check digit a multiple of 10, and adds it to the end.

If you enter 13 or 8 digits and the end differs from the calculated value, it draws by replacing the end with the calculated value.

The notification field displays the added or corrected numbers. For example, even if an incorrect final digit is left in the input field, the PNG bar and label will represent the final corrected string.

However, note that the SVG text label retains the raw input value, so the SVG label and bar will mismatch in these cases. Be sure to check the notification and image string before saving.

Check digits are useful for detecting input errors, but they do not find every mistake, nor do they prove the owner of the number.

This tool only calculates the number of digits and the end of the number string; it performs simple image generation and does not assign GS1 company prefixes, set product item codes, check against registered products, or verify allocation and duplication.

Setting up JAN/GTIN used in retail distribution requires formal acquisition procedures, such as separate company prefix registration and product number management as guided by GS1 Japan.

Even if you can turn a random 13 digits into an image, it does not mean you have acquired a legitimate identification number for commercial products.

Do not confuse test numbers with numbers to be actually distributed.

Chapter 3

Code39, ITF, Codabar Input Rules

In Code39, you can use alphanumeric characters and -, ., $, /, +, %, and (space). Lowercase letters are capitalized and encoded.

The * representing the start and end is added automatically, and if the entire input is already in the form of *...*, the outside is removed once and reattached.

Note that an internal * in the middle of the data is explicitly rejected. When displaying characters at the bottom for labels, the final encoded string including the starting and ending * is shown for both PNG and SVG formats, ensuring the label matches the generated bars.

Compare this with the display and management numbers on the equipment side you use.

ITF accepts only half-width numbers. It pairs two numbers, reflecting one as the bar width and the other as the blank width alternately, so if the input has an odd number of digits, a 0 is added to the beginning to make it an even number of digits.

This is merely for digit alignment, not a process that automatically creates a GS1 14-digit GTIN or check digit. In Codabar, the character table utilizes a 20-character width pattern from ZXing, and letters A to D are placed at the beginning and end.

If only numbers or permitted symbols are entered, A is automatically added to the beginning and B to the end. Pre-specified A to D are used as is.

For both formats, check the final value including added characters in notifications, and remember that both PNG and SVG labels will accurately reflect the final code rather than the raw input.

Compare it with the format expected by the reader. When inputting your data, consider providing clear numerical strings. For instance, inputting an odd-length string like 123 will result in 0123 to align the pairs for ITF.

In Codabar, an input like 1234 becomes A1234B, whereas C1234D remains as it specifies its own start and stop characters. Understanding these delimiter rules and width patterns is necessary for correct usage.

Always review the notification output to confirm the exact characters that will be encoded. The system relies on these specifications to construct the barcode structure, so ensuring your input matches the expected data format will produce the correct symbol.

The 20-character width pattern used in Codabar defines the specific bar and space sequences for each valid symbol, which includes digits, specific symbols like dashes or colons, and the A through D start and stop delimiters.

By verifying the generated code and the delimiter usage, you can confirm compatibility with your specific barcode scanning hardware.

Chapter 4

Bar Drawing, Dimensions, and Margins

The shape of the bar is drawn by converting the pattern for each format into an array of widths. In EAN, the left, right, and center guard patterns and the patterns for each number are arranged.

In Code39 and Codabar, the ratio of thin bars to thick bars is drawn as 1 to 3, and a thin blank is placed between characters. ITF combines bars and blanks for two digits.

The "Line thickness (Scale)" on the screen is the width of the thinnest single unit, selectable from 1 to 4 pixels. The "Line height (Height)" is adjusted from 40 to 160 pixels in steps of 10.

You can also toggle the label display. Changing these will alter the dimensions of the preview and saved image.

The background is always white, and the bars are black. The left and right margins are calculated dynamically as the maximum of 30 pixels or 12 times the line width scale.

The margin is important for scanners to distinguish the start and end of the bar, but this application provides no GS1 certification or guarantees for readability.

Physical print size, paper quality, ink bleed, scaled placement, and overlapping text or designs in the margins all affect the outcome.

Even if the preview is displayed small on the screen, the pixel dimensions of the saved image are determined by the chosen line width and height.

For example, even with the same number string, changing the line width from 2 pixels to 4 pixels doubles the width of the bar portion, but reducing the image during printing can crush thin lines.

When the label is turned off, the vertical dimension of the image is also shorter. Test with your application's dimension requirements and an actual scanner, and review the size or placement if it is difficult to read.

Chapter 5

PNG and SVG Saved Content

Saving as PNG creates an image from the white background, black bars, and optional label drawn on the Canvas in the screen. There is no transparent background or automatic high-resolution adjustment based on the device's pixel ratio.

Saving as SVG is a vector format that creates a white background and each black bar as individual rectangle elements. If labels are enabled, text elements are also added.

The SVG string escapes &, <, and > characters, and like the PNG, it correctly reflects the final encoded code rather than the raw input if check digits are calculated or start/end characters are added.

PNG and SVG use the same settings for bar width, height, and left/right margins.

The file name is "barcode_format_time.png" or ".svg" including the format and the time it was saved. You can save both formats with the same settings and compare them for your specific use cases.

There is no button to copy the image directly to the clipboard, nor is there PDF or EPS output. SVG can maintain the outline of the rectangles even when enlarged, but that alone does not mean it can be read by any printer or scanner.

The label font depends on the viewing environment, and the required character placement or physical dimensions for the actual label are not automatically verified.

For images distributed in business, please conduct reading tests after placing them on the final paper surface or packaging material.

Chapter 6

Boundaries Between Prototyping and Production

This tool can be used for prototyping that visualizes input values, such as package layout ideas, app reading screen tests, and management labels for personal book collections or equipment.

It can also be used to learn about EAN digit lengths and check digits. On the other hand, it does not perform product registration, number duplication checks, ISO or GS1 print quality certification, or compliance testing with readers.

For operations where reading errors have a large impact, such as medical and logistics fields, please follow dedicated standards and verification procedures.

It is important not to judge the safety of operations based solely on the generated images.

The process of calculating bars from input values and creating PNGs and SVGs is performed locally within the browser. However, this does not mean there is no communication across the entire site, nor does it unconditionally guarantee confidentiality.

Communications separate from the barcode generation process, such as page rendering, assets, access analytics, or ads, may occur.

Check your usage environment, including the handling of shared terminals and browser extensions. Images are downloaded to your device via the save button.

Even if you change the input on the page, images already saved to your device are not automatically deleted. A scanning test is highly recommended after saving.

Frequently Asked Questions (FAQ)

A.
No. This tool only processes the EAN-13/8 digit length and check digit to create an image, and does not issue GS1 company prefixes, register product numbers, or check for duplicates. For use on distributed products, please confirm the official procedures and operational rules of GS1 Japan or your local GS1 organization.
A.
In EAN-13 and EAN-8, the final number is automatically corrected to the calculated value, and a notification is displayed. For 12 or 7 digits, it automatically adds the end digit. The bars, along with both the PNG and SVG text labels, will reflect the final encoded value.
A.
This page only supports five formats: EAN-13/8, Code39, general ITF, and Codabar. QR and Code128 are not supported, and the ITF here is a simple format handling any even number of digits. There is no 14-digit validation or bearer bar specifically for ITF-14.
A.
Both have a white background and black bars. PNG is a Canvas pixel image, and SVG is a rectangular vector image, with an optional text label. There is no transparent background or direct copy to the clipboard functionality, nor PDF outputs.
A.
We cannot guarantee that. Even if you set the line width, height, and left/right margins, the actual print size, paper, ink, placement, and reader conditions will have an impact. Check the standard of your intended destination and perform a reading test on the final printed material.