QR Code Encoder & Decoder

Encodes any text or URL into a real, scannable QR code PNG (with proper Reed-Solomon error correction, not a lookalike image), or decodes a QR code from an uploaded image back into its original text, entirely in your browser. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-26

Overview

Introduction

Generating a QR code usually means trusting a third-party website with whatever you're encoding, which is a bad idea if that's a URL with a token, a Wi-Fi password, or anything else sensitive.

This tool encodes (and decodes) real QR codes entirely in your browser, so nothing you encode is ever transmitted anywhere.

What Is QR Code Encoder & Decoder?

A two-direction QR code tool: encoding turns text or a URL into a real, standards-compliant scannable QR code PNG using the `qrcode` library; decoding reads a QR code back out of an uploaded image using `jsQR`'s scanner.

Both directions implement the actual ISO/IEC 18004 QR code specification, not a simplified lookalike.

How QR Code Encoder & Decoder Works

Encoding chooses an appropriate data encoding mode for your text, applies Reed-Solomon error correction at your chosen level, arranges the result into the QR code's module grid, and renders it as a PNG data URL.

Decoding draws the uploaded image to an off-screen canvas to get raw pixel data, then runs jsQR's scanner, which locates the three corner finder patterns, reads the module grid, and reverses the Reed-Solomon encoding to recover the original text.

When To Use QR Code Encoder & Decoder

Use it to generate a QR code for a URL, a piece of text, or Wi-Fi/contact-card style data, when you don't want to hand that content to a third-party QR generator site.

Use the decoder to read the actual text out of a QR code image, whether to verify what a code actually contains before trusting it, or to recover text from a code you've lost the original source for.

Features

Advantages

  • Generates genuinely standards-compliant, scannable QR codes, not an approximation.
  • Supports all four standard error correction levels, letting you trade code density for damage tolerance.
  • Decodes real QR codes from images entirely client-side, useful for verifying a code's contents before trusting or sharing it.

Limitations

  • Decoding depends on image quality; very blurry, low-contrast, or extremely small/angled QR codes may fail to scan even though a phone camera might succeed with better framing or lighting.
  • Very long input text produces a correspondingly dense, harder-to-scan QR code; extremely long content may not be practical to encode into a single code at all.

Examples

Encoding a URL

Input

https://example.com

Output

a scannable QR code PNG that any phone camera or QR app can read back as https://example.com

The URL is encoded with alphanumeric/byte mode as appropriate and rendered as a standard QR code image.

Best Practices & Notes

Best Practices

  • Use a higher error correction level (Q or H) for codes that will be printed small, displayed on uneven surfaces, or might get partially obscured (like a logo overlay).
  • Verify a QR code's actual contents with the decoder before distributing it publicly, especially for anything security-relevant like a login or payment link.
  • Keep encoded content reasonably short for codes meant to be scanned quickly from a distance; denser codes need to be larger or closer to scan reliably.

Developer Notes

Encoding uses `qrcode`'s `toDataURL()` with a configurable `errorCorrectionLevel`; decoding uses `createImageBitmap()` plus an off-screen `<canvas>` to extract `ImageData`, which is passed directly to `jsQR()`, a pure-JS scanner implementing finder-pattern location and Reed-Solomon decoding.

QR Code Encoder & Decoder Use Cases

  • Generating a QR code for a URL, contact card, or Wi-Fi credential without using a third-party generator site
  • Reading back the actual text encoded in a QR code image before trusting or forwarding it
  • Testing how different error correction levels affect a generated code's density for the same content

Common Mistakes

  • Trusting an unfamiliar QR code without checking what it actually decodes to first, a classic phishing vector ("quishing").
  • Using the lowest error correction level for a code that will be printed small or partially covered, leading to unreliable scans.

Tips

  • If a photographed QR code won't decode, try cropping the image tightly around just the code and improving contrast before uploading it here.
  • Leave a quiet zone (blank margin) around the code when placing it in a design; cropping too tight around the modules themselves can prevent scanners from locating the finder patterns.

References

Frequently Asked Questions