qrencode[1] has been doing this for a long time in the terminal. It even supports half-block UTF-8 character (two bits per character, which makes them more square).
The opposite tool to qrencode is zbarimg, which accepts first parameter to image file containing the QR code and prints out the encoded content.
[0]: https://git.zx2c4.com/password-store/tree/src/password-store...
Very handy thing to have in the toolbox for those who live in the terminal, along with magic-wormhole and friends