Connecting the Dots: QR Codes and Their URI Functionality

Two Techie Vibes
3 min readOct 5, 2023

Before we dive into the heart of this article, we must express our gratitude for your patience and for returning to read our words once again. It’s good to be back.

Scan Me

Let’s get started , in this article we will know about QR Codes and URIs. QR Codes, short for Quick Response Codes, are two-dimensional barcodes that can store various types of information. QR Codes are capable of storing different types of data, including URLs, or Uniform Resource Identifiers (URIs). URIs are a standard way of identifying resources, such as websites, on the internet. They consist of a protocol identifier, such as “http://” or “https://”, followed by the domain name and any additional path or query parameters.

When a QR Code contains a URI, it can be scanned by a smartphone or a QR Code reader app, which can then interpret the URI and perform various actions. These actions may include opening a website, initiating a phone call, sending a text message, or even connecting to a Wi-Fi network.

The use of QR Codes with URIs has numerous applications in various fields. In marketing, QR Codes can be printed on advertisements or product labels to provide customers with quick access to promotional websites or online stores. They can also be used for event registration, allowing attendees to scan a QR Code to access event details or download tickets.

so let us see the steps of how to create a QR code by which stores the URL or URI:

URIs (Uniform Resource Identifiers) can be encoded in QR codes by converting them into a text format that can be easily represented within the QR code’s data matrix. This typically involves using URL encoding, which replaces certain reserved characters with percent-encoded representations. Here’s how URIs are encoded in QR codes:

1.Start with the URI:

  • Begin with the URI that you want to encode in the QR code. This could be a URL (http:// or https://), an email address (mailto:), a phone number (tel:), or any other valid URI scheme.

2. URL Encoding:

  • Apply URL encoding to the URI string to ensure that it contains only valid characters. URL encoding replaces special characters with a ‘%’ sign followed by two hexadecimal digits representing the character’s ASCII code. For example:
  • Space (‘ ‘) becomes ‘%20’
  • Ampersand (‘&’) becomes ‘%26’
  • Slash (‘/’) becomes ‘%2F’
  • Colon (‘:’) becomes ‘%3A’
  • Question mark (‘?’) becomes ‘%3F’
  • Equals (‘=’) becomes ‘%3D’
  • This step ensures that the URI does not contain characters that may disrupt the QR code encoding.

3. Concatenation:

  • Once the URI is URL-encoded, concatenate it with the appropriate URI scheme if it’s not already included. For example, if encoding a website address, prepend “http://” or “https://” as needed.

4.QR Code Generation:

  • Use a QR code generator tool or library to create the QR code image from the prepared URI string. There are various online tools and programming libraries available for generating QR codes.

5.Scanning and Decoding:

  • When someone scans the QR code using a compatible QR code reader app on their device, the app decodes the QR code and interprets the URI, allowing the user to take action based on the encoded URI scheme (e.g., open a web page, send an email, make a phone call).

Here’s an example of encoding a simple URL into a QR code:

  1. Original URL:
  2. URL Encoding:
  3. Concatenation (if needed): This step is not required in this example since the URI already includes the “https://” scheme.
  4. QR Code Generation: Generate the QR code image from the URL-encoded URI.
  5. Scanning and Decoding: When someone scans the QR code, it will open the web browser and navigate to the specified URL (

This process ensures that the QR code correctly represents the URI, making it easy for users to access the intended resource when scanning the code.

In conclusion, QR Codes provide a convenient and efficient way to store and share information, particularly when combined with URIs. And If you are new reader of our articles, check our other articles also :



Two Techie Vibes

Two tech enthusiasts who share a passion for all things in technology. Our articles cover a wide range of topics include programming, Tech tips and tricks etc..