Create QR Code in Oracle Database. Pure PLSQL code.
Let’s do it.
- Download the package from github ( https://github.com/zorantica/plsql-qr-code )
- Extract and Install the package in database
- Generate the qr code samples.
As always , let’s do it with some screenshots.
Open the plsql-qr-code repository by zorantica from https://github.com/zorantica/plsql-qr-code

Download the repository as ZIP

Extract Files

Go to the folder which have the oracle database package files.

PKS file is the package specification and PKB is package body. Execute the package in database PKS first and PKB second. I am doing it in Toad for oracle. you can use your own editors.

Package is created in our database.
Functions to return qr code are
- HTML code CLOB- f_qr_as_html_table
- BMP image as BLOB – f_qr_as_bmp
- BMP image as long row – f_qr_as_long_raw
- SVG resizable as CLOB – f_qr_as_svg
you can check the PKS file for the detailed parameter descriptions and usage.
Let me show a bmp qr code generated through the package.
select ZT_QR.f_qr_as_bmp ( p_data => 'https://oraclescribble.blogspot.com/', -- varchar2, --data going to be encoded into QR code p_error_correction => 'L', -- varchar2, --L, M, Q or H p_margines => 'N' -- varchar2 default 'N' --margines around QR code (4 modules) - values Y or N ) as blob_qr From Dual;

Save as BMP to check the qr code.


In the downloaded package, there is an APEX plugin too. If you are using Apex, you can use the same.
If you have any queries, please let me know through the comments.