myself248 17 hours ago

Related, https://qris.cool/ was posted here a few weeks ago and it's a really neat way to interactively explore the code itself, and see what any given pixel does.

  • devmandan 17 hours ago

    I'll have to check this one out. Thanks for sharing.

impune a day ago

There is a tool called qrazy box https://merri.cx/qrazybox/ It allows you to essentially remake a damaged or partially hidden QR code pixel by pixel, but has some limitations.

  • devmandan 17 hours ago

    This is exactly a baby-step in the right direction.

    Basically, we put data into QR codes the same as hard drives. Why then are there so few data recovery tools for QR codes?

    • jagged-chisel 17 hours ago

      But we don’t put terabytes, gigabytes, megabytes, or even kilobytes in QR codes. They don’t need to be recoverable in the same sense.

      • devmandan 16 hours ago

        Depends on the situation. It also depends on how sentimental a person is for their data or information needed in a given situation.

        If a cat shows up on your doorstep and now you got to figure out who owns the cat because you become concerned about it over time, what do you do if you can't scan the QR code on its collar?

        • RamRodification 16 hours ago

          Of course it depends on the situation. Almost everything "depends on the situation".

          The point is that in general, QR code content is less important than hard drive content. And that (the low demand) is the simple explanation to why there aren't as many tools for recovery.

        • jagged-chisel 15 hours ago

          It would probably be nifty for pet owners if, instead of putting a QR code on something that is known to wear, we came up with something a bit more resilient. Maybe something that could be permanently affixed to the pet in some way. Perhaps even under the skin. And it could even be powered by the device that reads it.

ethan_smith 20 hours ago

QR codes already have built-in Reed-Solomon error correction at different levels (L:7%, M:15%, Q:25%, H:30%), which is why they can often be read despite partial damage or obstruction.

devmandan 5 days ago

A software tool should exist to repair QR codes. People could really benefit from it because QR codes are used everywhere.

I'd like to find a way to repair QR codes through software. However, that begins with collecting a bunch of broken and corrupted QR codes people stumble across and fixing them up by hand. This will help spot patterns in how they fail. So please help out by submitting your QR code that doesn't scan. Please don't create QR codes that don't scan just to submit them. Thank you! In the past I have fixed one QR code by hand and it is shown at the link.

  • gblargg a day ago

    > A software tool should exist to repair QR codes.

    Seems that the solution is to add more redundancy (and stop covering the center pixels with an icon). The codes are designed to be self-correcting if the damage is slight enough or more redundancy is added.

    • Anonbrit a day ago

      If the problem is that the software can't find the centre, it could say so ,- that would hint to people that their icon is the problem

      • stavros 20 hours ago

        The problem isn't that it can't find the center, it's that you reduce redundancy by replacing those pixels with the icon. It can find the center fine and still be unable to scan because there isn't enough information there.

        • fragmede 20 hours ago

          but also because the link used has a bunch of tracking clumsily added, which further complicates scanning the thing. Compare the visual complexity of the QR code for HTTP://INSTAGRAM.COM/USERNAME (all caps is important*) vs the cutesy one the app generates.

          * https://shkspr.mobi/blog/2025/02/why-are-qr-codes-with-capit...

          • stavros 20 hours ago

            Yes, but that's more of a failing of the standard (a very natural usage pattern ends up being bad) vs what the user (or some app) did.

            • fragmede 19 hours ago

              I wanted to lampshade the caps part, but more explicitly, the QR code's Instagram link to my profile has igsh=xxxxxxxxxxxxx%3D%3D&utm_source=qr appened to it, where the X's are some tracking id. that tracking id that instafram app forces on people makes the qr code much more complicated (= smaller dots on a bigger qr code) which scans just fine on a iPhone 16 that instagram devs use, but that an 8 year old $50 Android phone isn't going to like as much.

  • andylynch 19 hours ago

    The bulk of the QR code is about specifying, quite exhaustively, multiple means of error prevention, detection , and correction. I guess some applications don’t use these features effectively, but compliant QR codes are really quite hard to corrupt.

  • mdaniel 16 hours ago

    > People could really benefit from it because QR codes are used everywhere.

    I hear you, and at the same time we're solving the wrong end of that pipeline, in my opinion. Almost every QR code I have ever seen in my life either points to bit.ly or some other link-shortener or marketing tracker domain which I would put good money will be dead way before the QR code's ink deteriorates

    I don't mean that QR is a terrible standard, but at least until we can get URL forms that are on the whole less than 128 characters, I wish they had met the world where it is. I believe the http2 compression scheme comes with dedicated dictionary slots for header strings that they know are going to appear, so QR would have benefited from the same (e.g. http/https taking less than 4/5 bytes, :// less than 3)

    Then again, having thought further about this, I guess Marketing's Razor is the most likely explanation: it wasn't a technical reason they're using bit.ly, it's for those sweet engagement metrics

  • simpaticoder 16 hours ago

    I imagine that a really useful piece of information is where the QR code was spotted. So that means treating the photo of the QR code and its exif data as part of the puzzle. No doubt some URLs are more common in some parts of the world than others in a kind of ode to geoguessing games.

OtherShrezzing 18 hours ago

Reading the QR code spec (or even just the wikipedia page) could help a lot here. A lot of the room on the code is taken up by metadata, rather than output-data. The output data is repeated lots of times across the code (this is why you can have a brand logo right in the middle of the code).

Repairing the metadata parts & iterating over each of the version number should make the overwhelming majority of broken QR codes usable again.

https://en.wikipedia.org/wiki/QR_code#/media/File:QR_Code_St...

  • echoangle 17 hours ago

    The data isn’t repeated, it’s using Reed-Solomon-coding and maximum redundancy is only 30% extra data.

    • OtherShrezzing 16 hours ago

      A QR code dedicates around 30% to metadata (positioning, timing data, version numbers). There are very few metadata arrangements shared across all QR codes, so you can recover 30% of the code with almost no computation.

      The other 70% is dedicated to "data", on which the Reed-Solomon-coding is applied. If your QR code is absolutely stuffed to its limit (about 2kb data), you can still destroy up to 51% of the image before the Reed-Solomon coding will start to fail at 30% redundancy.

      Most codes only store a few hundred bytes of data, so you can afford to destroy a lot more before the payload is also destroyed.

      I'd expect the minimal-viable QR code for a 100 character URI can be very degraded.

  • Karliss 17 hours ago

    Qr codes have some redundancy but nowhere near "repeated lots of time". Not even twice. More realistically there is 5-30% of redundancy and some very clever math to allow any individual part of data (not neceserily any part of qr code)to be damaged up to certain percentage.

  • MyPasswordSucks 16 hours ago

    > Reading the QR code spec (or even just the wikipedia page) could help a lot here.

    Comprehending what you read could help a lot, too.

    The output data generally isn't repeated even a single time in full, let alone "lots of times". That's what error correction keys are for.

    The fact that you can stick a logo in the middle doesn't have much to do with anything. I can (and many publishers have!) put a bunch of color pictures in the middle of a book, it doesn't mean the data in the book is repeated.

  • devmandan 17 hours ago

    I'm less interested in the theory and am more interested in the practice. I own a printed copy of the 2015 version of the spec, but don't find the insights I get from it have much to do with its ability to scan as compared to taking my phone out and scanning a QR code does.

    In practice, I mostly I find that the corners are the most finicky part. However, that is just my current opinion.

    • echoangle 15 hours ago

      I think if the corners really are more sensitive, it’s because the reader can’t find the QR code and it’s orientation, not because the data is not recoverable. If you would manually enter the pixels into a decoder, the corners shouldn’t be more sensitive than other spaces of the code, I think.

irs 15 hours ago

I participated in the QR Show in NYC mentioned in the post. It sent me down a rabbit hole and gave me a whole new perspective on QR codes now.

Show: https://qrshow.nyc/retrospective.html Related: https://bsky.app/profile/sri.xyz/post/3llnpa3tvqs2u

  • gregsadetsky 15 hours ago

    wow I fully missed your bsky post, I'm sorry

    it was extremely fun organizing that QR Show. it's actually very fun organizing events/jams in general (I'm also thinking of https://wambamjam.recurse.com/ ) -- you put out an invite, get it to interesting people, and then step back. (and, like, get snacks).

    that QR Show was truly a success because of people like you who brought original works -- a lot of these pieces were made in the last weeks! and days! leading to it. it was just astonishing to see.

    I've shared with some friends that I'd be afraid to repeat that show because it went so well (like - should there be a yearly? qr show??). I'm still mulling this over.

    thanks again!

    • irs 6 hours ago

      hey greg, no problem. Definitely looking forward for the next show. Maybe in a new city? Or a different theme altogether?

ForHackernews 21 hours ago

The most common failure case I see for broken QR codes is it scans fine but it was created using some commercial link-bouncer service and they stopped paying the subscription fees so the redirect is dead.

  • nicbou 20 hours ago

    I once saw a 10 second ad on a QR code for a restaurant menu.

  • darkwater 20 hours ago

    This infuriates me. You are using a QR exactly to easily share a (long) link, why the hell you need to use a link shortener? Why is the market for small shops, restaurants, bars, small museums, small towns etc so riddled with technically incompetent people?

    • crazygringo 19 hours ago

      > easily share a (long) link, why the hell you need to use a link shortener?

      Because it makes the QR code simpler (less "pixels") and therefore more robust. Given the same physical size, scratches affect it less, and a phone can read it from further away. You want to avoid long links in QR codes whenever possible.

      The other thing is analytics, of course. You can generate 10 different small QR codes that lead to the same long URL, to find out where they're getting scanned, so you know which locations are popular and worthwhile and which ones are not.

      And maybe don't criticize restaurant owners for being technically incompetent? I'm sure they would find you just as incompetent at cooking at scale.

      • creatonez 8 hours ago

        > And maybe don't criticize restaurant owners for being technically incompetent?

        Most QR code menus are entirely managed by just one company that is effectively a monopoly. It's not the restaurant staff making these terrible, it's the digital services provider.

      • darkwater 13 hours ago

        I'm criticizing QR providers of restaurants owners for being incompetent. I will also criticize restaurants that give you only the QR option for the menu and the menu is a PDF unreadable on a mobile screen (whoever decided that).

    • wiradikusuma 20 hours ago

      Sometimes, because the service sneakily shortens the link. I wanted to share a WIP whitelabel ticket sales platform ( https://pentas.id ) with a friend. I didn't have time to build the logic to generate QR code, so I just googled "online QR generator". I pasted my link, a QR code was generated. When I tried it using Pixel's Camera app, the preview is NOT my link. Although when I tap it, it eventually goes to my link.

      • devmandan 16 hours ago

        Yup. Dark patterns exist with QR code hosting services. It's revolting.

      • AStonesThrow 18 hours ago

        > I didn't have [money], so I just [had someone else pay to generate a QR].

        Fixed that for you. If you are using free stuff that you google-searched, then you're the product.

        • dvdkon 16 hours ago

          A paid service/app would surely never pull such a trick, right?

          It sadly requires a lot of vigilance not to fall for these "petty deceptions".

    • pimlottc 18 hours ago

      Being able to change the destination URL is one reason to use a redirect. Many users do not control their tech infrastructure, or have the knowledge to create redirects. This allows them to update or change content without changing their QR codes.

      • darkwater 13 hours ago

        I could buy that, but also the QR and the destination website are usually done by the same web agency. The issue is that probably the web agency is externalizing itself the QR thing, or try to centralize all their clients in the same system.

    • fragmede 20 hours ago

      because they want the analytics the eg bit.ly packages up nicely for them. The software that's missing (though tbh, I Haven looked) is the let's encrypt certbot for doing your own analytics that a link shortener would get you.

  • artursapek 21 hours ago

    bit rot makes me sad

    • future10se 21 hours ago

      That would probably be closer to link rot[1].

      Interestingly enough, printed QR codes physically degrading as described in the article is actual bit rot, albeit a form often overlooked.

      [1] - https://en.wikipedia.org/wiki/Link_rot

technotarek 21 hours ago

But whatever came of the lost cat??!!

  • devmandan 17 hours ago

    You are asking a good question. A question I don't have an answer to. I wondered the same. I never got an answer.

viiralvx 20 hours ago

It's pretty cool that QR codes were created by a Japanese automotive company in order to address the limitations of scanning bar codes, mainly that the scans only worked with a certain orientation. [1]

That being said, I believe bar codes have the UPC number below it in case the code itself is damaged. Could QR codes have a similar textual encoding to identify them? And would that even fit legibly in the square?

[1] - https://www.microsoft.com/en-us/microsoft-365-life-hacks/pri...

  • ryukoposting 18 hours ago

    QR codes also encode text, just like UPC-A. As far as I'm aware, no barcode reader can actually interpret the letters at the bottom of the code. They're just there for a human failover when the barcode gets messed up.

    With that in mind, there's nothing preventing you from putting the encoded text of a QR code below it. I have a QR code in my living room that guests can scan to connect to the Wi-Fi, and I put the SSID and password below the QR code on the same page. It's not the exact encoded string, but it serves the same purpose.

    My first "real" job was working for an industrial automation company, where I did a lot of work on RFID and barcode readers. Barcodes (both 2D and 3D) are delightful things. There's an enormous variety out there, and you would never know unless you look closely, because they're so well-supported. I'd bet the barcode reader at your local grocery store can read at least 9 different encodings. Some are probably physically capable of reading QR (and other 3D codes like Aztec), but the firmware has been instructed to ignore them.

Retr0id 18 hours ago

The biggest failure mode I've seen in-the-wild is from QR codes being attached to non-flat surfaces, e.g. wrapped around a lamp post, or on a car panel with "crease" in the bodywork (sorry, no specific examples on-hand)

AI is getting pretty good at depth estimation, and some phones even ship with LIDAR, so I think it should be feasible to correct for these automatically. Especially if you can get pictures from multiple angles.