# How can I get cleartext values from a Central configuration QR code?

**URL:** <https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446>\
**Category:** Support\
**Tags:** odk-collect, odk-xlsform\
**Created:** [April 21, 2024, 2:44am UTC](https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446 "2024-04-21T02:44:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Faisal\_Amani](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/faisal_amani/32/22270_2.png) [@Faisal\_Amani](https://forum.getodk.org/u/Faisal_Amani)\
**Post date:** [April 21, 2024, 2:44am UTC](https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446/1 "2024-04-21T02:44:55Z")

</div>

I have a Central configuration QR code. How can I get cleartext values from it?

---

<div class="post-metadata">

**Author:** ![LN](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/ln/32/1605_2.png) [@LN](https://forum.getodk.org/u/LN)\
**Post date:** [April 22, 2024, 4:12am UTC](https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446/3 "2024-04-22T04:12:17Z")

</div>

I have removed the QR code image because it appears to contain real credentials. In general, Collect configuration QR codes should be treated as confidential.

You used the word "decrypt" in your original question. There is no encryption on QR codes, they are compressed clear text.

[https://docs.getodk.org/collect-import-export/#making-your-own-qr-code](https://docs.getodk.org/collect-import-export/#making-your-own-qr-code) describes how to build a QR code that Collect can read. You can use the reverse process to get values out of an existing QR code. Can you please describe what your use case is?

---

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [March 16, 2026, 3:12am UTC](https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446/4 "2026-03-16T03:12:20Z")

</div>

> [@Faisal\_Amani](#):
>
> How can I get cleartext values from it

FWIW, I do this rather a lot - mainly to extract the `server_url` for programmatic OpenRosa API requests. So what I do (on Mac) is:

1. Get your App User's QR code image from Central's (Legacy or Managed) and decode the image online; eg [https://zxing.org/w/decode.jspx](https://zxing.org/w/decode.jspx)

2. Copy `QR=’xxx’` from above. This is the raw base64 text encoded by the QR image.

3. `brew install pigz`  
Although I try to avoid pulling in additional packages unless _absolutely_ necessary, unzipping stdio on macOS is remarkably a bit of a PITA, but `pigz` makes it trivial.

4. `echo $QR | base64 --decode | pigz -d -c`  
This will give you the decoded JSON with all the Collect settings. eg for a ‘Managed’ style QR code:

Optional: I like my JSON pretty, so I pipe it thru [jq](https://formulae.brew.sh/formula/jq). jq also lets me parse out exactly what I want.

`echo $QR | base64 --decode | pigz -d -c | jq .general.server_url`  
`"https://central.my.org/v1/key/XXXXXYYYYYZZZZZ/projects/16"`

---

<div class="post-metadata">

**Author:** ![gareth](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/gareth/32/30952_2.png) [@gareth](https://forum.getodk.org/u/gareth)\
**Post date:** [March 16, 2026, 3:37am UTC](https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446/5 "2026-03-16T03:37:43Z")

</div>

> [@Xiphware](#):
>
> Get your App User's QR code image from Central's (Legacy or Managed) and decode the image online

Be aware that the QR code contains real credentials so you need to trust the service that is decoding the image. A more secure solution is to decode the QR code locally with a command line tool. I use `zbarimg` on linux, and I think `zbar` is the equivalent for mac.

---

<div class="post-metadata">

**Author:** ![Xiphware](https://getodk.b-cdn.net/user_avatar/forum.getodk.org/xiphware/32/2587_2.png) [@Xiphware](https://forum.getodk.org/u/Xiphware)\
**Post date:** [March 16, 2026, 5:11am UTC](https://forum.getodk.org/t/how-can-i-get-cleartext-values-from-a-central-configuration-qr-code/46446/6 "2026-03-16T05:11:46Z")

</div>

> [@gareth](#):
>
> A more secure solution is to decode the QR code locally with a command line tool.

Yup.

`brew install zbar`  
`zbarimg -q MyQR.png | cut -f2 -d: | base64 --decode | pigz -d -c | jq .general.server_url`  
`"https://cental.my.org/v1/key/XXXXXYYYYYZZZZZ/projects/6"`

Note, [zbar](https://formulae.brew.sh/formula/zbar) will install a _lot_ of dependencies. (BTW I’m using [homebrew](https://brew.sh/) to install these sundry utility packages on macOS).
