---
name: "qrtool-decode"
section: "1"
platform: "linux"
package: "qrtool"
version: "0.13.2-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/qrtool-decode"
---

# qrtool-decode(1)

detect and decode a QR code

## NAME

qrtool-decode - detect and decode a QR code

## SYNOPSIS

**qrtool decode** \[*OPTION*\]... \[*IMAGE*\]

## DESCRIPTION

This command detects and decodes a *QR code* \<https://www.qrcode.com\> from a raster or vector image. By default, the result will be output to standard output.

**Supported image file formats**\

• *BMP* \<https://en.wikipedia.org/wiki/BMP\_file\_format\> (if enabled at compile time)

• *DDS* \<https://en.wikipedia.org/wiki/DirectDraw\_Surface\> (if enabled at compile time)

• *Farbfeld* \<https://tools.suckless.org/farbfeld/\> (if enabled at compile time)

• *GIF* \<https://en.wikipedia.org/wiki/GIF\> (if enabled at compile time)

• *Radiance RGBE* \<https://en.wikipedia.org/wiki/RGBE\_image\_format\> (if enabled at compile time)

• *ICO* \<https://en.wikipedia.org/wiki/ICO\_(file\_format)\> (if enabled at compile time)

• *JPEG* \<https://jpeg.org/jpeg/\> (if enabled at compile time)

• *OpenEXR* \<https://openexr.com/\> (if enabled at compile time)

• *PNG* \<https://en.wikipedia.org/wiki/PNG\>

• *PNM* \<https://netpbm.sourceforge.net/doc/pnm.html\> (if enabled at compile time)

• *QOI* \<https://qoiformat.org/\> (if enabled at compile time)

• *SVG* \<https://www.w3.org/Graphics/SVG/\> (if enabled at compile time)

• *TGA* \<https://en.wikipedia.org/wiki/Truevision\_TGA\> (if enabled at compile time)

• *TIFF* \<https://en.wikipedia.org/wiki/TIFF\> (if enabled at compile time)

• *WebP* \<https://developers.google.com/speed/webp/\> (if enabled at compile time)

• *XBM* \<https://en.wikipedia.org/wiki/X\_BitMap\> (if enabled at compile time)

Use **-t** option to specify the image format. If this option is not specified, the image format is determined based on the extension or the magic number.

**Caution**\

This command only supports decoding a *normal QR code* \<https://www.qrcode.com/codes/model12.html\>, and does not support decoding a *Micro QR code* \<https://www.qrcode.com/codes/microqr.html\> and a *rMQR code* \<https://www.qrcode.com/codes/rmqr.html\>.

## POSITIONAL ARGUMENTS

*IMAGE*

Input image file. If *IMAGE* is not specified, or if "-" is specified, the image will be read from standard input. Supported raster image formats are based on the formats supported by the `image <https://crates.io/crates/image>` `crate. The` `format of `*IMAGE*` is determined based on the extension or the magic number if` `possible. If the format cannot be determined, use `**--type**`. Note that the SVG` `image is rasterized before scanning.`

## OPTIONS

- **-t**`, `**--type**` `*FORMAT*

  `The format of the input. If `*FORMAT*` is not specified, the format is` `determined based on the extension or the magic number.`

  `The possible values are:`

  **bmp**

  `Windows Bitmap. This value is available if the decode-from-bmp feature` `is enabled at compile time.`

  **dds**

  `DirectDraw Surface. This value is available if the decode-from-dds` `feature is enabled at compile time.`

  **farbfeld**

  `Farbfeld. This value is available if the decode-from-ff feature is` `enabled at compile time.`

  **gif**

  `Graphics Interchange Format. This value is available if the` `decode-from-gif feature is enabled at compile time.`

  **hdr**

  `Radiance RGBE. This value is available if the decode-from-hdr feature` `is enabled at compile time.`

  **ico**

  `ICO file format. This value also includes the CUR file format. This value` `is available if the decode-from-ico feature is enabled at compile time.`

  **jpeg**

  `JPEG. This value is available if the decode-from-jpeg feature is` `enabled at compile time.`

  **openexr**

  `OpenEXR. This value is available if the decode-from-exr feature is` `enabled at compile time.`

  **png**

  `Portable Network Graphics.`

  **pnm**

  `Portable Anymap Format. This value is available if the decode-from-pnm` `feature is enabled at compile time.`

  **qoi**

  `Quite OK Image Format. This value is available if the decode-from-qoi` `feature is enabled at compile time.`

  **svg**

  `Scalable Vector Graphics. This value also includes the gzip-compressed` `SVG image. This value is available if the decode-from-svg feature is` `enabled at compile time.`

  **tga**

  `Truevision TGA. This value is available if the decode-from-tga feature` `is enabled at compile time.`

  **tiff**

  `Tag Image File Format. This value is available if the decode-from-tiff` `feature is enabled at compile time.`

  **webp**

  `WebP. This value is available if the decode-from-webp feature is` `enabled at compile time.`

  **xbm**

  `X BitMap. This value is available if the decode-from-xbm feature is` `enabled at compile time.`

- **--verbose**

  `Also print the metadata. It is output to stderr. This option conflicts with` **--metadata**`.`

- **--metadata**

  `Print only the metadata. It is output to stderr. This option conflicts with` **--verbose**`.`

- **-h**`, `**--help**

  `Print help message. The short flag (`**-h**`) will print a condensed help message` `while the long flag (`**--help**`) will print a detailed help message.`

- **-V**`, `**--version**

  `Print version number.`

## EXIT STATUS

**0**

`Successful program execution.`

**1**

`An error occurred.`

**2**

`An error occurred while parsing command-line arguments.`

`Exit statuses other than these are defined by` `<sysexits.h> <https://man.openbsd.org/sysexits>.`

## NOTES

`Source repository:`

` <https://github.com/sorairolake/qrtool>`

## EXAMPLES

`Detect and decode a QR code from the given image:`

`$ `**qrtool decode input.png**

`Decode a QR code from the given WebP image:`

`$ `**qrtool decode -t webp input.webp**

`Also print the metadata when decoding a QR code:`

`$ `**qrtool decode --verbose input.qoi**

## REPORTING BUGS

`Report bugs to:`

` <https://github.com/sorairolake/qrtool/issues>`

## COPYRIGHT

`Copyright © 2022 Shun Sakai and contributors`

` 1. ``This program is distributed under the terms of either the Apache License 2.0` `or the MIT License.`

` 2. ``This manual page is distributed under the terms of the Creative Commons` `Attribution 4.0 International Public License.`

`This is free software: you are free to change and redistribute it. There is NO` `WARRANTY, to the extent permitted by law.`

## SEE ALSO

**qrtool**`(1), `**qrtool-completion**`(1), `**qrtool-encode**`(1), `**zbarimg**`(1)`
