Loading...

Barcodes are a convenient way to share product information, coupon codes, ticket IDs, or unique identifiers inside your HubSpot website. Even though HubSpot CMS doesn’t have a built-in barcode generator, you can easily add one using JavaScript libraries like JsBarcode. Before getting into the implementation steps, let’s understand what barcodes are and the different types you can generate inside HubSpot CMS.

What Are Barcodes and Why They Matter in HubSpot Websites

A Barcode is a machine-readable representation of data that uses a series of lines, spaces, or patterns to encode numbers or text, allowing scanners or mobile devices to identify and process information quickly. Barcodes are widely used in ecommerce, retail, logistics, healthcare, and membership systems because they standardize data and automate tracking.

Types of Barcodes

1. CODE128 (Unleashing Alphanumeric Brilliance)

Screenshot 2025 11 21 173250

CODE 128 is a high-density linear barcode that can encode the full ASCII set, including numbers, letters, and special characters. It has three subsets, A, B, and C, optimized for different data types, with subset C efficiently encoding numeric pairs. It includes a start character, data, a check character, and a stop character for accurate scanning, making it ideal for shipping, inventory, and logistics.

And if you’re using barcode-driven workflows across multiple tools, our tutorial on HubSpot-Salesforce multi-system syncing can help you maintain consistent, real-time data across platforms.

2. Code39 (The Chameleon of Barcodes)

Screenshot 2025 11 21 173440

CODE 39 is a widely used alphanumeric barcode that can encode uppercase letters (A-Z), numbers (0–9), and a few special characters like -, ., $, /, +, %, and space. It is simple and easy to print, with each character represented by nine bars and spaces (hence the name “39”).

3. EAN-5 (Unveiling Secrets in Five Digits)

Screenshot 2025 11 21 173546

EAN-5 is a 5-digit supplemental barcode typically used alongside EAN-13 or UPC-A barcodes. EAN-5 uses only numeric digits (0–9) and includes a check digit encoded within its structure to ensure accurate scanning. Its main purpose is to provide extra data without altering the main product identifier.

4. UPC-12 (The Harmonious Code of Retail Symphony)

Screenshot 2025 11 21 173716

UPC-12, also known as the Universal Product Code, is a 12-digit linear barcode widely used in retail for product identification. It consists of a number system digit, a manufacturer code (5 digits), a product code (5 digits), and a check digit for error detection. UPC-12 encodes only numeric digits (0–9) and is designed for fast, reliable scanning at checkout counters. Its simplicity, standardization, and global adoption make it a staple in retail inventory and point-of-sale systems.

Now that we’ve covered the basics, let’s dive straight into how to generate barcodes in HubSpot CMS using a custom module.

Prerequisite

  • HubSpot Developer account.
  • Basic knowledge of HTML, CSS, and JavaScript.

Step 1: Create a file in Design Manager

  • In HubSpot navigate to contents->Design Manager-> click on create a file.
  • Select the file type HTML + HubL and click on the next button.
  • Enter the file name and file location and click create. 
  • Add your code.
  • Click publish when done.
  • Follow the same steps for CSS and Javascript files.

index.html

Screenshot 41
Screenshot 42

Style.css

Screenshot 43
Screenshot 44

script.js

Screenshot 45
Screenshot 46

Step 2: Create a Website Page

  • In HubSpot navigate to Content->Website Pages->click on Create.
  • Click on the ‘Skip to templates’ button.
  • Enter your HTML file name in search bar and select the file 
  • Go to Settings->General -> Enter the page title.
  • Click On Publish 
  • You can click on Add Domain or just copy the URL of the website page.
Untitled design 5

Watch Live Demo

Conclusion

Barcodes make your HubSpot website more interactive, scannable, and automation-friendly. With a simple JavaScript library like JsBarcode, you can generate multiple formats such as CODE128, CODE39, UPC, and EAN on your CMS pages.

If you want to integrate advanced barcode features, custom modules, or automation workflows, get HubSpot Development Services today. Our team can help you build, customize, and scale your HubSpot website for better performance and conversions.

No Data Found.

Related Articles
Orchestrator vs. Traditional Flows

Businesses use Salesforce automation to reduce manual work, improve efficiency, and automate repetitive business processes. Two commonly used automation approaches inside Salesforce are Traditional Flows and Flow Orchestrator. Traditional Flows are mainly used for simple automation tasks such as updating records, sending notifications, creating tasks, and automating business logic. Flow Orchestrator is designed for more […]

Read More
The Rise of Agentic Government_ What Salesforce’s 2026 Insights Mean for the Future of Public Sector AI

Government technology has often been seen as slower to evolve than the private sector. But Salesforce’s latest research challenges that idea in a big way. In fact, the new findings suggest that public sector organizations may now be moving faster than many businesses when it comes to adopting AI agents and preparing for a more […]

Read More
How To Use Email Service in APEX

Managing approvals, updates, and record changes directly from email can significantly improve efficiency within Salesforce workflows. Instead of logging in, navigating records, and manually updating fields, users can simply respond to emails and trigger automated updates using Email Service in APEX. This approach is especially useful for businesses leveraging Salesforce automation and looking to enhance […]

Read More
Design and Implementation of Salesforce Jira Task Integration 1 1

Businesses have been using Salesforce for CRM operations and Jira for Agile project tracking. However, without integration, teams manually update both systems, leading to data inconsistency and inefficiency.This mechanism establishes a real-time integration between Salesforce and Jira, allowing seamless synchronization of tasks and agile board statuses.  A custom Salesforce dashboard was developed that replicates Jira-style […]

Read More
Dark Mode in Salesforce Enabling It and Creating Theme Ready Lightning Web Components with SLDS 2.0 1 1

With the Winter ’26 release, Salesforce introduced Dark Mode in Lightning Experience. Dark Mode has been introduced as a beta feature in Winter ’26, and at first it was available only for Starter Edition orgs. It is now rolling out further with Spring ’26 to Professional, Enterprise, and Developer editions. To use Dark Mode, Salesforce […]

Read More
How to Merge and Brand PDF Files in Salesforce Using LWC Visualforce PDF LIB 1

Salesforce developers frequently encounter document automation requirements that go beyond standard Apex-based PDF generation. From merging multiple ContentVersion files to dynamically applying branding like watermarks and headers, traditional server-side approaches often hit Salesforce heap size limits (6MB/12MB), creating performance and scalability challenges. This guide presents a heap-limit-safe PDF merging architecture in Salesforce using Lightning Web […]

Read More
Our Location worldwide
Indian Flag India
3rd Floor, A-10, Pegasus Tower, Sector 68, Noida, Uttar Pradesh 201301 +91-1203239658
United States of America Flag USA
333 West Brown Deer Road Unit G – 366 Milwaukee WI, USA 53217 +1(262) 310-7818
United Kingdom Flag UK
7 Bell Yard, London, WC2A 2JR +44 20 3239 9428
Canada Canada
HIC Global Solutions INC
6D - 7398 Yonge St #1124 Thornhill, ON L4J 8J2 Canada +1(262) 310-7818