{
  "created": "2019-12-29T20:41:54Z",
  "hierarchy": [
    {
      "name": "ROOT",
      "type": "folder",
      "uri": "/ROOT"
    },
    {
      "name": "Generating a WiFi Password QR Code",
      "type": "article",
      "uri": "Generating_a_WiFi_Password_QR_Code"
    }
  ],
  "html": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\"/>\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/>\n    <meta property=\"og:image\" content=\"/img/logo512.png\"/>\n    <meta property=\"og:site_name\" content=\"Nikhil's Personal Wiki\"/>\n    <link rel=\"og:image\" href=\"/img/logo512.png\"/>\n    <link rel=\"icon\" href=\"/img/favicon.png\"/>\n    <link rel=\"apple-touch-icon\" href=\"/img/logo192.png\"/>\n    <link rel=\"stylesheet\" href=\"/css/styles.css\"/>\n    <link rel=\"stylesheet\" href=\"/css/highlight.css\"/>\n    <title>Generating a WiFi Password QR Code &ndash; Nikhil's Personal Wiki</title>\n    <script type=\"text/javascript\" id=\"MathJax-script\" defer src=\"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js\"></script>\n    <script defer data-domain=\"wiki.nikhil.io\" src=\"https://plausible.io/js/plausible.js\"></script>\n  </head>\n  <body>\n    <noscript>\n      👉 A few things won&#8217;t work if you have JavaScript disabled.\n    </noscript>\n    <div class=\"container article\">\n      <header>\n        <nav>\n          <ul>\n            <li>\n              <a href=\"/archive\"  title=\"Archive\">\n                <span>Archive</span>\n              </a>\n            </li>\n            <li>\n              <a href=\"/Home\"  title=\"Home\">\n                <span>Home</span>\n              </a>\n            </li>\n            <li>\n              <a href=\"/random\"  title=\"See a random article\">\n                <span>Random</span>\n              </a>\n            </li>\n            \n            \n              \n                <li>\n                  <a href=\"/Generating_a_WiFi_Password_QR_Code/raw\"  title=\"View Source\">\n                    <span>Raw</span>\n                  </a>\n                </li>\n              \n              \n            \n            \n            \n            \n              \n                <li>\n                  <a href=\"/Generating_a_WiFi_Password_QR_Code/revisions\" >\n                    <span>Revisions</span>\n                  </a>\n                </li>\n              \n            \n            \n              \n                \n                  <li>\n                    <a href=\"/Generating_a_WiFi_Password_QR_Code/index.json\" title=\"View JSON Object\">\n                      <span>JSON</span>\n                    </a>\n                  </li>\n                \n              \n            \n          </ul>\n        </nav>\n      </header>\n      <main>\n        \n  <nav>\n  <ul>\n    \n      <li>\n        <a data-entity-type=\"folder\" href=\"/ROOT\" title=\"ROOT\">Root</a>\n      </li>\n    \n      <li>\n        <a data-entity-type=\"article\" href=\"/Generating_a_WiFi_Password_QR_Code\" title=\"Generating a WiFi Password QR Code\">Generating a WiFi Password QR Code</a>\n      </li>\n    \n    \n    \n    \n    \n  </ul>\n</nav>\n\n  <h1>Generating a WiFi Password QR Code\n    \n  </h1>\n  <p>Saving here <a href=\"https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/\">via</a></p>\n<pre tabindex=\"0\" class=\"chroma\"><code><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># On macOS. Note to self: use pwgen to generate secure passwords.</span>\n</span></span><span class=\"line\"><span class=\"cl\">brew install qrencode pwgen\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># Set the SSID</span>\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"nv\">SSID</span><span class=\"o\">=</span><span class=\"s2\">&#34;My Home Wifi&#34;</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># Set a looooong password for the AP</span>\n</span></span><span class=\"line\"><span class=\"cl\">pwgen -s <span class=\"m\">63</span> &gt; <span class=\"s2\">&#34;</span><span class=\"si\">${</span><span class=\"nv\">SSID</span><span class=\"si\">}</span><span class=\"s2\">.password.txt&#34;</span>\n</span></span><span class=\"line\"><span class=\"cl\">\n</span></span><span class=\"line\"><span class=\"cl\"><span class=\"c1\"># Put it all together</span>\n</span></span><span class=\"line\"><span class=\"cl\">qrencode <span class=\"se\">\\\n</span></span></span><span class=\"line\"><span class=\"cl\"><span class=\"se\"></span>  --size<span class=\"o\">=</span><span class=\"m\">15</span> <span class=\"se\">\\\n</span></span></span><span class=\"line\"><span class=\"cl\"><span class=\"se\"></span>  --output<span class=\"o\">=</span><span class=\"si\">${</span><span class=\"nv\">SSID</span><span class=\"si\">}</span>.png <span class=\"se\">\\\n</span></span></span><span class=\"line\"><span class=\"cl\"><span class=\"se\"></span>  <span class=\"s2\">&#34;WIFI:T:WPA;S:</span><span class=\"si\">${</span><span class=\"nv\">SSID</span><span class=\"si\">}</span><span class=\"s2\">;P:</span><span class=\"k\">$(</span>cat <span class=\"s2\">&#34;</span><span class=\"si\">${</span><span class=\"nv\">SSID</span><span class=\"si\">}</span><span class=\"s2\">.password.txt&#34;</span><span class=\"k\">)</span><span class=\"s2\">;;&#34;</span>\n</span></span></code></pre><p>Goes without saying that should be displayed in a location that&rsquo;s not visible from, say, a window. On iOS, the camera app automagically recognizes the resulting QR code and asks if you&rsquo;d like to join the network.</p>\n\n\n      </main>\n      <footer>\n        <p>\n          \n        </p>\n        <ul>\n          \n  <li>666 bytes</li>\n  \n    <li>Created on Sunday, 29 December 2019 at 20:41 UTC</li>\n    <li>Modified on Tuesday, 13 January 2026 at 18:47 UTC</li>\n    <br/>\n    <li>\n      <a\n        href=\"https://github.com/afreeorange/wiki.nikhil.io.articles/edit/master/Generating a WiFi Password QR Code.md\"\n        title=\"Edit this article\">Edit this article</a>\n    </li>\n  \n\n          <li>\n            <a href=\"https://github.com/afreeorange/bock\" title=\"View the project that generates this wiki on Github\">bock\n            5.2.0-beta</a>\n          </li>\n        </ul>\n      </footer>\n    </div>\n    \n    \n      <script type=\"text/javascript\">\n        /**\n         * Quick shortcut to take me to the search box which is 90% of how I navigate\n         * this wiki anyway.\n         */\n        document.body.addEventListener(\n          \"keypress\", (e) => e.key === \"f\"\n          ? window.location.assign(\"/archive\")\n          : null);\n        window.MathJax = {\n          tex: {\n            inlineMath: [\n              [\n                '$', '$'\n              ],\n              [\n                '\\\\(', '\\\\)'\n              ]\n            ]\n          },\n          svg: {\n            fontCache: 'global'\n          }\n        };\n      </script>\n    \n  </body>\n</html></head></html>\n",
  "id": "3fbef9bf-b248-588d-b427-bb0741695c88",
  "modified": "2026-01-13T18:47:28Z",
  "revisions": [
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2026-01-13T18:47:28Z",
      "id": "2436477560f26e23d00a24add1cbfeafdca4af78",
      "shortId": "24364775",
      "subject": "No compression\n",
      "content": "Saving here [via](https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/)\n\n```bash\n# On macOS. Note to self: use pwgen to generate secure passwords.\nbrew install qrencode pwgen\n\n# Set the SSID\nSSID=\"My Home Wifi\"\n\n# Set a looooong password for the AP\npwgen -s 63 > \"${SSID}.password.txt\"\n\n# Put it all together\nqrencode \\\n  --size=15 \\\n  --output=${SSID}.png \\\n  \"WIFI:T:WPA;S:${SSID};P:$(cat \"${SSID}.password.txt\");;\"\n```\n\nGoes without saying that should be displayed in a location that's not visible from, say, a window. On iOS, the camera app automagically recognizes the resulting QR code and asks if you'd like to join the network. \n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2019-12-29T20:44:54Z",
      "id": "76e31cca5f31f0013b9a99f915e6ada306658eb2",
      "shortId": "76e31cca",
      "subject": "Fix command\n",
      "content": "Saving here [via](https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/)\n\n```bash\n# On macOS. Note to self: use pwgen to generate secure passwords.\nbrew install qrencode pwgen\n\n# Set the SSID\nSSID=\"My Home Wifi\"\n\n# Set a looooong password for the AP\npwgen -s 63 > \"${SSID}.password.txt\"\n\n# Put it all together\nqrencode \\\n  --size=15 \\\n  --output=${SSID}.png \\\n  \"WIFI:T:WPA;S:${SSID};P:$(cat \"${SSID}.password.txt\");;\"\n```\n\nGoes without saying that should be displayed in a location that's not visible from, say, a window. On iOS, the camera app automagically recognizes the resulting QR code and asks if you'd like to join the network. \n"
    },
    {
      "authorEmail": "mail@nikhil.io",
      "authorName": "Nikhil Anand",
      "date": "2019-12-29T20:41:54Z",
      "id": "412f7d7729cbc0467432240406aa7d894bec7bc0",
      "shortId": "412f7d77",
      "subject": "Create Generating a WiFi Password QR Code.md\n",
      "content": "Saving here [via](https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/)\n\n```bash\n# On macOS. Note to self: use pwgen to generate secure passwords.\nbrew install qrencode pwgen\n\n# Set the SSID\nSSID=\"My Home Wifi\"\n\n# Set a looooong password for the AP\npwgen -s 63 > \"${SSID}.password.txt\"\n\n# Put it all together\nqrencode \\\n  --size=15 \\\n  --output=${SSID}.png \\\n  \"WIFI:T:WPA;S:${SSID};P:$(cat 00wifi.txt);;\"\n```\n\nGoes without saying that should be displayed in a location that's not visible from, say, a window. On iOS, the camera app automagically recognizes the resulting QR code and asks if you'd like to join the network. \n"
    }
  ],
  "sizeInBytes": 666,
  "source": "Saving here [via](https://feeding.cloud.geek.nz/posts/encoding-wifi-access-point-passwords-qr-code/)\n\n```bash\n# On macOS. Note to self: use pwgen to generate secure passwords.\nbrew install qrencode pwgen\n\n# Set the SSID\nSSID=\"My Home Wifi\"\n\n# Set a looooong password for the AP\npwgen -s 63 > \"${SSID}.password.txt\"\n\n# Put it all together\nqrencode \\\n  --size=15 \\\n  --output=${SSID}.png \\\n  \"WIFI:T:WPA;S:${SSID};P:$(cat \"${SSID}.password.txt\");;\"\n```\n\nGoes without saying that should be displayed in a location that's not visible from, say, a window. On iOS, the camera app automagically recognizes the resulting QR code and asks if you'd like to join the network. \n",
  "title": "Generating a WiFi Password QR Code",
  "untracked": false,
  "uri": "/Generating_a_WiFi_Password_QR_Code",
  "relativePath": "Generating a WiFi Password QR Code.md"
}
