Extracting a URL from a QR code is a two-step process: first decode the image into plain text, then run that text through a URL extraction tool. A QR code is just a square that stores a string of characters, and when that string is a web address, decoding the image gives you a raw URL you can copy, open, or feed into a list-cleaning tool. The phone camera built into iOS and Android will surface the link after a successful scan, and any dedicated scanner app or online decoder will do the same for a saved screenshot or a printed code. Once the URL is sitting in plain text, a tool like the URL Extractor can pull it out, normalize the host case, strip the trailing prose punctuation, and drop it into a clean one-per-line list. The whole workflow runs locally in your browser, so the decoded text never has to leave the device you are working on.

The reason the workflow is two steps and not one is that a QR code is an encoded image, not a live hyperlink. The squares and finder patterns only become a usable web address after a decoder turns the bitmap back into a string. Once that string is in a text field, ordinary text-processing tools can do the rest, which is why pairing a decoder with a URL extractor is the most reliable way to recover a clean link from a printed code, a screenshot, or a scanned image.

how to extract url from qr code
How to Extract a URL From a QR Code

What a QR Code Actually Stores

A QR code is a two-dimensional barcode that can hold up to a few thousand alphanumeric characters, depending on the version, error-correction level, and encoding mode. The payload can be a URL, plain text, an email address, a vCard, a Wi-Fi configuration, an SMS body, a calendar event, or a custom string. When you scan a marketing flyer, a restaurant menu, or a payment card, the payload is almost always a URL because that is the cheapest way to send someone to a webpage without typing.

Because the QR code is an image, the URL is never visible to a text tool until the image is decoded. The squares themselves are not letters; they are bit patterns that obey a documented error-correction scheme. A scanner reverses that scheme, recovers the byte stream, applies the chosen character encoding, and emits the payload as a string. The string is what you finally see on screen, and the string is what a URL extractor can read.

If you only need the link for a single code, you can usually stop at the decoding step and copy the link directly. A list-cleaning tool becomes valuable when you have a batch of decoded codes, a research note full of mixed text and links, an exported chat log with embedded codes, or any situation where the URL is surrounded by punctuation, markdown, or duplicate formatting you want to normalize away.

Decode the Image Into Plain Text First

Pick the decoder that matches the situation you have in front of you. A printed code on a wall is easiest to scan with a phone camera. A screenshot in a folder or an image attached to a research document is easier to handle with a desktop decoder, an online tool, or a command-line library.

  • Phone camera works on iOS 11+ and most modern Android builds. Open the camera, point it at the code, and tap the banner that appears. The link opens directly in the browser, and a long-press lets you copy the URL to the clipboard.
  • Google Lens handles screenshots, saved images, and codes that the default camera refuses. The decoded text appears under the photo, and you can copy or share the URL.
  • Dedicated scanner apps such as the open-source Binary Eye for Android add history, batch scanning, and raw-text export that a default camera does not provide.
  • Online decoders accept an uploaded PNG, JPG, or SVG and return the decoded text in a copyable field. They are the most accessible option when the code is on a laptop with no camera attached.
  • Command-line tools like zbarimg from the ZBar library decode one or many image files at once, which is useful for bulk research and log analysis.

Whichever path you take, copy the decoded text into a single block. If you only scanned one code, the block may be just a single line. If you scanned many, or if you pasted the body of an article that mentions several codes, the block will be a paragraph. Both shapes work for the next step.

Extract the URL With the URL Extractor

The URL Extractor is designed to find every HTTP, HTTPS, and www address in a pasted block, validate each one with the browser URL parser, normalize the result, and emit a clean list you can download. It is the second half of the QR-code workflow, the half that takes decoded text and turns it into a reliable list of usable links.

  1. Paste the decoded text into the input area. Drop the single line, the paragraph, or the multi-page export. The tool accepts up to 1,000,000 UTF-16 code units in a single paste, which is enough for hundreds of decoded codes or a long research draft.
  2. Extract the URLs and review what the browser parser returned. Each candidate that begins with http://, https://, or www (case-insensitive) is validated. The preview shows the unique count, the normalized spelling of every link, and any candidates the parser rejected.
  3. Download the one-URL-per-line UTF-8 TXT result. A short-lived Blob URL is created only when you click Download, so the file contains exactly the same strings you see in the preview, joined with LF separators and ready to import into a spreadsheet, a CRM, or a research database.

If you only have a single URL after decoding, you can still run it through the tool to strip a stray trailing period, normalize the case of the hostname, and confirm that the parser accepts the link as valid. The download is optional and only useful when you want a file rather than a copy-and-paste.

How the URL Extractor Normalizes Your List

After the candidate is matched, the browser URL constructor is responsible for serialization. That is the step that decides what the output looks like, and it follows the WHATWG URL Standard rather than the original spelling. The transformation is conservative but visible, and a small table makes the patterns concrete.

Source textWhat the browser parser returnsReason
https://EXAMPLE.com/pathhttps://example.com/pathHostnames are lowercased during serialization.
https://example.comhttps://example.com/A missing root path becomes a trailing slash.
WWW.Example.com/articlehttps://www.example.com/articleA bare www candidate receives https:// before validation.
See https://example.org/page, or visit (https://example.org/).https://example.org/page and https://example.org/Trailing commas, periods, and unmatched closing brackets are stripped as prose.
https://example.com and https://EXAMPLE.com/https://example.com/ (one entry)Duplicates are removed after normalization using exact serialized equality.

The parser documented at the MDN URL constructor reference is the same engine that runs in every modern browser, which is why the output is consistent across machines. The same serialization rules appear in the WHATWG URL Standard, so a URL that comes out of the tool is a URL that other tools will also accept.

Limits Worth Knowing Before You Paste

The URL Extractor is a text scanner, not a web crawler. Knowing what it does not do is the fastest way to avoid surprises.

  • It only recognizes HTTP, HTTPS, and www candidates. FTP, mailto, file, javascript, bare domains without a www prefix, and email addresses are out of scope and will not appear in the result.
  • It does not visit the URLs. A syntactically valid link can still be offline, malicious, or redirect somewhere unexpected. The tool makes no network request to the extracted addresses and offers no safety verdict.
  • It does not strip tracking parameters, query reordering, or path-case differences. Two URLs that differ by query order, fragment, case in the path, or embedded credentials remain separate entries after deduplication.
  • The input ceiling is 1,000,000 UTF-16 code units, and the unique-result ceiling is 10,000 URLs. Over either limit and the paste is rejected rather than silently truncated, so you will know if your research note is too large to process in one pass.
  • Source content never leaves the browser tab. Scanning, parsing, and the download Blob all run locally. There is no server account, no history, and no external dataset involved in the processing.

Credentials embedded in a URL remain visible in the output, because removing them would change the parsed address. Avoid pasting secrets, signed links, private hosts, or personal data into the workflow unless the destination and your local device are trusted.

When This Workflow Isn't the Right Fit

If the QR code stores a Wi-Fi password, a vCard, a calendar event, or a piece of plain text that is not a URL, the URL Extractor has nothing to extract. The decode step will return a usable string, but the second step will simply find no candidates and return an empty list. That outcome is informative rather than a failure: it tells you the payload is not a web address and that a different downstream tool is the right next move.

For HTML pages, Markdown documents, CSV columns, or email archives, a format-aware parser is usually a better choice because the link may live inside a tag, a link reference, or a quoted field that a prose scanner treats as text. The Excel-focused URL extraction guide is a useful reference for the spreadsheet case, and the same pattern applies whenever structure matters more than visible text.

Finally, if you need to confirm that a decoded URL is reachable, safe, or short-link-resolved, run a separate check after the extraction. The clean list the tool produces is a good input for a reachability test, a redirect inspector, or a URL safety service, because every entry is already normalized and free of stray punctuation from the original prose.

For a deeper look, see Convert PDF to Markdown in VS Code: A Two-Step Path.