Latest in Entertainment

Image credit: 4QR.xyz

How to hide tiny artworks in your URLs

Turns out you can code an entire webpage into the browser bar.
740 Shares
Share
Tweet
Share
Save
4QR.xyz

Sponsored Links

We all know the humble URL; it tells the internet where we want to go. But, as digital artist Alexander Reben discovered, it can do so much more. It turns out that entire webpages can live within its character string -- you just need to know how to build them. Reben does, and has been using a technique he developed to hide tiny works of art -- like digital treasure chests -- in your browser bar.

"The original idea was to be able to embed little artworks into QR codes, so when you scanned them with your phone, it'd open a browser window with all the code embedded within the QR itself." Reben said. "Then I realized that if I could do a little code, then I could do as much code as I can fit in a browser bar." Turns out, the modest address bar can handle quite a lot of info -- anywhere from 9,000 to 60,000 characters depending on browser and server variables, Reben explained.

To create these Inception-esque URLs, Reben built 4QR.xyz, a website that generates URLs from whatever sort of code you input -- including whole webpages, or in Reben's case, digital artworks like "almost a circle" and "not again." It can be any sort of code that you can put in a web browser, from PHP to HTML, images, video, audio or even just plain text.

The encoding process itself is straightforward; it simply converts whatever you've input over to base64 then attaches it to the end of the URL. The decoding process reverses that, converting the base64 back to the original language before copy-pasting it back into a browser window.

Interestingly, the generated web pages don't live on any server -- the URL itself is the code's repository. When you scan one of these with your phone, all the data needed to render it (including the webpage itself) is already encoded in the link. This eliminates the need for an internet connection. "It's only one line of code when it's decoded so it's really quite simple," Reben said. And it doesn't even need to be a QR code, as he originally designed it. Reben has managed to get the system to work with commercial link shorteners like Goo.gl and Bit.ly as well as NFC cards and even the blockchain.

"I was surprised that no one had done this before," Reben admitted. "I just sort of 'hacked'' the URL. I didn't do anything nonstandard in the browser, just in a nontraditional way."

As with conventionally shortened links, there can be a bit of concern as to what you are clicking through -- especially if you happen to find one of these out in the wild. Is it a webpage or the next iteration of Stuxnet? Who knows! However, Reben sees it being used in far more benign situations, like gallery showings. "So I could see a gallery where all the walls would just have QR codes and you'd have to scan it with your phone to render that code into art. And, because it's not hosted anywhere, that code only exists in that space at that time, linking the physicality of the QR codes."

All products recommended by Engadget are selected by our editorial team, independent of our parent company. Some of our stories include affiliate links. If you buy something through one of these links, we may earn an affiliate commission.

Andrew has lived in San Francisco since 1982 and has been writing clever things about technology since 2011. When not arguing the finer points of portable vaporizers and military defense systems with strangers on the internet, he enjoys tooling around his garden, knitting and binge watching anime.

740 Shares
Share
Tweet
Share
Save
Comments

From around the web

Page 1Page 1ear iconeye iconFill 23text filevr