Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 2 min read

Building an Offline-First, Zero-Watermark Barcode & MRP Label Generator in the Browser

Most online barcode generators are frustrating to use. If you run a small business or sell on marketplaces like Amazon, Flipkart, or Shopify, you've probably hit one of these walls: Ugly watermarks unless you pay a mo

Most online barcode generators are frustrating to use. If you run a small business or sell on marketplaces like Amazon, Flipkart, or Shopify, you've probably hit one of these walls:

  1. Ugly watermarks unless you pay a monthly subscription.
  2. Data privacy concerns β€” uploading your proprietary product SKUs and price lists to an unknown remote server.
  3. Lack of bulk handling β€” needing to generate 200 barcodes one by one.
  4. Incorrect check digits β€” scanners beeping with an error at customer pickup because the 13th digit was calculated wrong.

To fix this once and for all, I built ownbarcode.com: an offline-first, client-side barcode and MRP label generator that runs 100% inside your browser. No account required, no watermarks, and nothing leaves your device.

Here is how I architected it and the engineering lessons learned along the way.

πŸ› οΈ The Architecture: 100% Client-Side

I wanted the tool to be fast, private, and capable of working even when the user’s internet drops in a busy packaging warehouse.

1. In-Browser Vector Rendering (Canvas + SVG)

Instead of relying on backend generation APIs (like ImageMagick or Python Pillow microservices), all barcode symbologies are calculated and drawn directly in the browser using HTML5 Canvas and SVG.

  • EAN-13 & UPC-A: Strict 1D linear symbology with automatic modulo-10 check digit calculation.
  • Code 128 & ITF-14: High-density alphanumeric barcodes for shipping cartons and inventory tracking.
  • 2D Formats: QR codes and Data Matrix for modern retail and FSSAI packaging requirements.

Because it's vector-based, the labels print razor-sharp at 300 DPI on thermal printers without blurriness.

2. Zero-Upload Bulk Generation (Excel / CSV)

For sellers with hundreds of products, the app supports dragging and dropping an .xlsx or .csv spreadsheet.

Using client-side Web Workers and lightweight binary sheet parsing, the browser parses columns (SKU, Product Name, MRP, Expiry Date), computes check digits, and renders a paginated print sheet of hundreds of barcodes in under 2 seconds.

3. Thermal Printer Optimization (ZPL / TSPL & Dimensions)

One common issue Indian D2C sellers face is that thermal printers (TVS, TSC, Zebra) crop labels if margins aren't exact.

I pre-configured exact millimetre-calibrated templates:

  • 50mm Γ— 25mm (Standard 2" barcode sticker)
  • 50mm Γ— 38mm (MRP + FSSAI Food label sticker)
  • 100mm Γ— 150mm (4" Γ— 6" shipping labels)
  • Standard A4 sheets (24-up, 40-up sticker sheets)

πŸ’‘ What's Next?

I recently submitted the companion app to the Shopify App Store to automate barcode printing directly from merchant order flows.

If you are an e-commerce seller, indie builder, or warehouse manager, feel free to try it out:
πŸ‘‰ https://ownbarcode.com

I’d love to hear your thoughts, feedback, and feature suggestions in the comments! What tools do you use in your packaging and shipping workflows?

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.