DEV Community

süleyman
süleyman

Posted on

How I Built a Barcode & QR Code Generator with No Backend (Vanilla JS)

Most barcode generators I found online had the same problems:

👉 Too many ads
👉 Slow performance
👉 Required signup

So I decided to build my own.

But with one rule:

👉 No backend. Everything runs in the browser.


The Idea

I wanted a tool that:

  • Works instantly
  • Requires no login
  • Runs entirely client-side
  • Supports multiple barcode formats

Tech Stack

I kept it as simple as possible:

  • Vanilla JavaScript
  • HTML + CSS
  • No frameworks
  • No API calls

Everything is generated directly in the browser.


Supported Formats

The tool currently supports:

  • EAN-13
  • Code128
  • UPC
  • QR codes (WiFi, URL, email)

How It Works

Instead of sending data to a server:

  1. User enters input
  2. JavaScript generates the barcode
  3. It renders instantly on screen
  4. User downloads it

No requests, no latency.


Why No Backend?

I chose this approach for a few reasons:

  1. Speed

No API = instant response

  1. Privacy

User data never leaves the browser

  1. Simplicity

No server = less maintenance


Challenges I Faced

Barcode accuracy

Ensuring the generated barcodes are scannable and valid

Cross-device support

Making it work smoothly on mobile

Performance

Keeping everything lightweight


What I Learned

  • You don’t always need a backend
  • Simpler solutions often perform better
  • UX matters more than complexity

Try It Yourself

I made the tool public here:

👉 https://barkodkarekod.com

It runs entirely in your browser.


What’s Next?

I’m currently improving it for:

  • Amazon FBA barcode requirements
  • Better label sizing
  • More export options

If you’ve built something similar or have ideas to improve it, I’d love your feedback 👀

Top comments (0)