René's URL Explorer Experiment


Title: Generate Beautiful QR Codes With Python – Real Python

Open Graph Title: Generate Beautiful QR Codes With Python – Real Python

Description: In this tutorial, you'll learn how to use Python to generate QR codes, from your standard black-and-white QR codes to beautiful ones with your favorite colors. You'll learn how to format QR codes, rotate them, and even replace the static background with moving images.

Open Graph Description: In this tutorial, you'll learn how to use Python to generate QR codes, from your standard black-and-white QR codes to beautiful ones with your favorite colors. You'll learn how to format QR codes, rotate them, and even replace the static background with moving images.

Mail addresses
?subject=Python article for you&body=Generate Beautiful QR Codes With Python on Real Python https://realpython.com/python-generate-qr-code/

Opengraph URL: https://realpython.com/python-generate-qr-code/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
{
  "@context": "http://schema.org",
  "@type": "Article",
  "headline": "Generate Beautiful QR Codes With Python",
  "image": {
    "@type": "ImageObject",
    "url": "https://files.realpython.com/media/How-to-Create-a-QR-Code-Using-Python_Watermarked.984c2f66c081.jpg",
    "width": 1920,
    "height": 1080
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://realpython.com/python-generate-qr-code/",
    "lastReviewed": "2026-03-18",
    "author": {
      "@type": "Person",
      "name": "Sarah Haq",
      "image": "https://realpython.com/cdn-cgi/image/width=1403,height=1403,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/me2.aa9435a6ec63.jpg",
      "url": "https://realpython.com/team/shaq/",
      "affiliation": {
        "@type": "Organization",
        "@id": "https://realpython.com/#organization",
        "name": "Real Python",
        "url": "https://realpython.com",
        "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
      }
    },
    "reviewedBy": [
      {
        "@type": "Person",
        "name": "Aldren Santos",
        "image": "https://realpython.com/cdn-cgi/image/width=500,height=500,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/Aldren_Santos_Real_Python.6b0861d8b841.png",
        "url": "https://realpython.com/team/asantos/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Geir Arne Hjelle",
        "image": "https://realpython.com/cdn-cgi/image/width=800,height=800,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/gahjelle.470149ee709e.jpg",
        "url": "https://realpython.com/team/gahjelle/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Kate Finegan",
        "image": "https://realpython.com/cdn-cgi/image/width=400,height=400,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/VZxEtUor_400x400.7169c68e3950.jpg",
        "url": "https://realpython.com/team/kfinegan/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      },
      {
        "@type": "Person",
        "name": "Philipp Acsany",
        "image": "https://realpython.com/cdn-cgi/image/width=1920,height=1920,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/pacsany.19bcf16f5a00.jpg",
        "url": "https://realpython.com/team/pacsany/",
        "affiliation": {
          "@type": "Organization",
          "@id": "https://realpython.com/#organization",
          "name": "Real Python",
          "url": "https://realpython.com",
          "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
        }
      }
    ]
  },
  "datePublished": "2023-09-06T14:00:00+00:00",
  "dateModified": "2026-03-18T11:32:13.390768+00:00",
  "publisher": {
    "@type": "Organization",
    "@id": "https://realpython.com/#organization",
    "name": "Real Python",
    "url": "https://realpython.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png",
      "width": 512,
      "height": 512
    },
    "description": "Real Python is a leading provider of online Python education and one of the largest language-specific online communities for software developers. It publishes high-quality learning resources, such as tutorials, books, and courses to an audience of millions of developers, data scientists, and machine learning engineers each month.",
    "slogan": "Become a Python Expert",
    "email": "info@realpython.com",
    "sameAs": [
      "https://github.com/realpython",
      "https://www.youtube.com/realpython",
      "https://twitter.com/realpython",
      "https://x.com/realpython",
      "https://www.linkedin.com/company/realpython-com/",
      "https://www.facebook.com/learnrealpython",
      "https://www.instagram.com/realpython",
      "https://www.tiktok.com/@realpython.com"
    ]
  },
  "author": {
    "@type": "Person",
    "name": "Sarah Haq",
    "image": "https://realpython.com/cdn-cgi/image/width=1403,height=1403,fit=crop,gravity=auto,format=auto/https://files.realpython.com/media/me2.aa9435a6ec63.jpg",
    "url": "https://realpython.com/team/shaq/",
    "affiliation": {
      "@type": "Organization",
      "@id": "https://realpython.com/#organization",
      "name": "Real Python",
      "url": "https://realpython.com",
      "logo": "https://realpython.com/static/real-python-logo-square-512.157ae6bf64ed.png"
    }
  },
  "description": "In this tutorial, you'll learn how to use Python to generate QR codes, from your standard black-and-white QR codes to beautiful ones with your favorite colors. You'll learn how to format QR codes, rotate them, and even replace the static background with moving images."
}

authorReal Python
theme-color#18354c
color-schemelight dark
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/How-to-Create-a-QR-Code-Using-Python_Watermarked.984c2f66c081.jpg
og:imagehttps://files.realpython.com/media/How-to-Create-a-QR-Code-Using-Python_Watermarked.984c2f66c081.jpg
twitter:creator@realpython
og:typearticle
og:site_nameReal Python
apple-mobile-web-app-titleReal Python

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/python-generate-qr-code/
Your Learning Plan →Your personalized Python learning planhttps://realpython.com/account/learning-plan/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest&_from=nav_library
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/search?kind=exercise&kind=quiz&_from=nav_library
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Mentor AI →NewYour personal Python mentorhttps://realpython.com/mentor/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Live Courses →Live, instructor-led Python courseshttps://realpython.com/live/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Unlock All Content and Become a Python Expert →Get unlimited access to all Real Python has to offerhttps://realpython.com/account/join/?from=navbar_learn
Unlock All Content →Become a Python Experthttps://realpython.com/account/join/?from=navbar_learn
More https://realpython.com/python-generate-qr-code/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Contributorhttps://realpython.com/jobs/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?intent=navbar&next=%2Fpython-generate-qr-code%2F
Browse Topicshttps://realpython.com/tutorials/all/
Guided Learning Pathshttps://realpython.com/learning-paths/
Basicshttps://realpython.com/search?level=basics&_from=sidebar_level
Intermediatehttps://realpython.com/search?level=intermediate&_from=sidebar_level
Advancedhttps://realpython.com/search?level=advanced&_from=sidebar_level
aihttps://realpython.com/tutorials/ai/
algorithmshttps://realpython.com/tutorials/algorithms/
apihttps://realpython.com/tutorials/api/
best-practiceshttps://realpython.com/tutorials/best-practices/
careerhttps://realpython.com/tutorials/career/
communityhttps://realpython.com/tutorials/community/
databaseshttps://realpython.com/tutorials/databases/
data-sciencehttps://realpython.com/tutorials/data-science/
data-structureshttps://realpython.com/tutorials/data-structures/
data-vizhttps://realpython.com/tutorials/data-viz/
devopshttps://realpython.com/tutorials/devops/
djangohttps://realpython.com/tutorials/django/
dockerhttps://realpython.com/tutorials/docker/
editorshttps://realpython.com/tutorials/editors/
flaskhttps://realpython.com/tutorials/flask/
front-endhttps://realpython.com/tutorials/front-end/
gamedevhttps://realpython.com/tutorials/gamedev/
guihttps://realpython.com/tutorials/gui/
machine-learninghttps://realpython.com/tutorials/machine-learning/
newshttps://realpython.com/tutorials/news/
numpyhttps://realpython.com/tutorials/numpy/
projectshttps://realpython.com/tutorials/projects/
pythonhttps://realpython.com/tutorials/python/
stdlibhttps://realpython.com/tutorials/stdlib/
testinghttps://realpython.com/tutorials/testing/
toolshttps://realpython.com/tutorials/tools/
web-devhttps://realpython.com/tutorials/web-dev/
web-scrapinghttps://realpython.com/tutorials/web-scraping/
Table of Contentshttps://realpython.com/python-generate-qr-code/#toc
Using Python to Generate a Basic QR Codehttps://realpython.com/python-generate-qr-code/#using-python-to-generate-a-basic-qr-code
Changing the Size of the QR Codehttps://realpython.com/python-generate-qr-code/#changing-the-size-of-the-qr-code
Formatting the Border of the QR Codehttps://realpython.com/python-generate-qr-code/#formatting-the-border-of-the-qr-code
Changing the Colors of the QR Codehttps://realpython.com/python-generate-qr-code/#changing-the-colors-of-the-qr-code
Rotating the QR Codehttps://realpython.com/python-generate-qr-code/#rotating-the-qr-code
Creating Animated QR Codeshttps://realpython.com/python-generate-qr-code/#creating-animated-qr-codes
Conclusionhttps://realpython.com/python-generate-qr-code/#conclusion
https://realpython.com/feedback/survey/article/python-generate-qr-code/liked/?from=article-sidebar
https://realpython.com/feedback/survey/article/python-generate-qr-code/disliked/?from=article-sidebar
Generating QR Codes With Python 40m · 11 lessons https://realpython.com/courses/generating-qr-codes/
Sarah Haqhttps://realpython.com/python-generate-qr-code/#author
https://realpython.com/python-generate-qr-code/#reader-comments
intermediatehttps://realpython.com/tutorials/intermediate/
Using Python to Generate a Basic QR Codehttps://realpython.com/python-generate-qr-code/#using-python-to-generate-a-basic-qr-code
Changing the Size of the QR Codehttps://realpython.com/python-generate-qr-code/#changing-the-size-of-the-qr-code
Formatting the Border of the QR Codehttps://realpython.com/python-generate-qr-code/#formatting-the-border-of-the-qr-code
Changing the Colors of the QR Codehttps://realpython.com/python-generate-qr-code/#changing-the-colors-of-the-qr-code
Rotating the QR Codehttps://realpython.com/python-generate-qr-code/#rotating-the-qr-code
Creating Animated QR Codeshttps://realpython.com/python-generate-qr-code/#creating-animated-qr-codes
Conclusionhttps://realpython.com/python-generate-qr-code/#conclusion
Remove adshttps://realpython.com/account/join/
Generating QR Codes With Pythonhttps://realpython.com/courses/generating-qr-codes/
Click here to download the sample codehttps://realpython.com/bonus/python-generate-qr-code-bonus/
https://realpython.com/python-generate-qr-code/#using-python-to-generate-a-basic-qr-code
Segnohttps://segno.readthedocs.io/en/latest/
piphttps://realpython.com/what-is-pip/
command linehttps://realpython.com/python-command-line-arguments/#the-command-line-interface
make()https://segno.readthedocs.io/en/stable/api.html#segno.make
.save()https://segno.readthedocs.io/en/stable/api.html#segno.QRCode.save
variablehttps://realpython.com/python-variables/
file pathhttps://realpython.com/python-pathlib/
run the Python scripthttps://realpython.com/run-python-scripts/
https://files.realpython.com/media/my_first_qrcode.b078ef62bf2b.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-generate-qr-code/#changing-the-size-of-the-qr-code
https://files.realpython.com/media/my_scaled_qrcode.2c1276f96dc9.png
https://realpython.com/python-generate-qr-code/#formatting-the-border-of-the-qr-code
https://files.realpython.com/media/my_wout_border_qrcode.f4e646e04f70.png
https://files.realpython.com/media/my_wide_border_qrcode.6b1cc3d13ccb.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-generate-qr-code/#changing-the-colors-of-the-qr-code
RGBhttps://en.wikipedia.org/wiki/RGB_color_model
hexadecimalhttps://en.wikipedia.org/wiki/Web_colors#Hex_triplet
https://files.realpython.com/media/my_lightblue_qrcode.132c4c251fc6.png
https://files.realpython.com/media/my_darkblue_qrcode.328cb18411be.png
https://files.realpython.com/media/my_darkblue_qrcode2.c49f51f87f81.png
https://files.realpython.com/media/my_green_datadark_qrcode.d9fd345ec91a.png
https://files.realpython.com/media/my_green_datamodules_qrcode.e8f74bc23d81.png
Segno documentationhttps://segno.readthedocs.io/en/latest/colorful-qrcodes.html#module-names
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-generate-qr-code/#rotating-the-qr-code
animated backgroundhttps://realpython.com/python-generate-qr-code/#creating-animated-qr-codes
Pillowhttps://realpython.com/image-processing-with-the-python-pillow-library/
https://files.realpython.com/media/my_rotated_qrcode.7e94062391c1.png
https://files.realpython.com/media/my_rotated_qrcode2.0c97ae34bdbb.png
https://files.realpython.com/media/my_formatted_rotated_qrcode.8dc7dff63df8.png
Remove adshttps://realpython.com/account/join/
https://realpython.com/python-generate-qr-code/#creating-animated-qr-codes
“Smells like Teen Spirit”https://www.youtube.com/watch?v=hTWKbfoikeg
urllibhttps://realpython.com/urllib-request/
Kurt Cobain passionately playing the guitarhttps://media.giphy.com/media/LpwBqCorPvZC0/giphy.gif
https://files.realpython.com/media/my_animated_qrcode.bf292d5692d6.gif
https://realpython.com/python-generate-qr-code/#conclusion
Click here to download the sample codehttps://realpython.com/bonus/python-generate-qr-code-bonus/
https://realpython.com/feedback/survey/article/python-generate-qr-code/liked/?from=article-footer
https://realpython.com/feedback/survey/article/python-generate-qr-code/disliked/?from=article-footer
Generating QR Codes With Pythonhttps://realpython.com/courses/generating-qr-codes/
https://realpython.com/team/shaq/
» More about Sarahhttps://realpython.com/team/shaq/
https://realpython.com/team/asantos/
Aldrenhttps://realpython.com/team/asantos/
https://realpython.com/team/gahjelle/
Geir Arnehttps://realpython.com/team/gahjelle/
https://realpython.com/team/kfinegan/
Katehttps://realpython.com/team/kfinegan/
https://realpython.com/team/pacsany/
Philipphttps://realpython.com/team/pacsany/
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-generate-qr-code
Level Up Your Python Skills »https://realpython.com/account/join/?utm_source=rp_article_footer&utm_content=python-generate-qr-code
https://realpython.com/feedback/survey/article/python-generate-qr-code/liked/?from=article-comments
https://realpython.com/feedback/survey/article/python-generate-qr-code/disliked/?from=article-comments
LinkedInhttps://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Frealpython.com%2Fpython-generate-qr-code%2F
Twitterhttps://twitter.com/intent/tweet/?text=Interesting%20Python%20article%20on%20%40realpython%3A%20Generate%20Beautiful%20QR%20Codes%20With%20Python&url=https%3A%2F%2Frealpython.com%2Fpython-generate-qr-code%2F
Blueskyhttps://bsky.app/intent/compose?text=Interesting%20Python%20article%20on%20%40realpython.com%3A%20Generate%20Beautiful%20QR%20Codes%20With%20Python%20https%3A%2F%2Frealpython.com%2Fpython-generate-qr-code%2F
Facebookhttps://facebook.com/sharer/sharer.php?u=https%3A%2F%2Frealpython.com%2Fpython-generate-qr-code%2F
Get tips for asking good questionshttps://realpython.com/python-beginner-tips/#tip-9-ask-good-questions
get answers to common questions in our support portalhttps://support.realpython.com
Real Python Community Chathttps://realpython.com/community/
“Office Hours” Live Q&A Sessionhttps://realpython.com/office-hours/
intermediatehttps://realpython.com/tutorials/intermediate/
Generating QR Codes With Pythonhttps://realpython.com/courses/generating-qr-codes/?utm_source=realpython&utm_medium=web&utm_campaign=related-course&utm_content=python-generate-qr-code
https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-generate-qr-code%2F
Continue »https://realpython.com/account/signup/?intent=continue_reading&utm_source=rp&utm_medium=web&utm_campaign=rwn&utm_content=v1&next=%2Fpython-generate-qr-code%2F
Sign-Inhttps://realpython.com/account/login/?intent=continue_reading&next=/python-generate-qr-code/
Start Herehttps://realpython.com/start-here/
Your Learning Planhttps://realpython.com/account/learning-plan/
Browse Topicshttps://realpython.com/tutorials/all/
Learning Resourceshttps://realpython.com/search
Python Referencehttps://realpython.com/ref/
Cheat Sheetshttps://realpython.com/cheatsheets/
Support Centerhttps://support.realpython.com
Mentor AIhttps://realpython.com/mentor/
Learning Pathshttps://realpython.com/learning-paths/
Tutorialshttps://realpython.com/tutorials/
Courseshttps://realpython.com/courses/
Quizzeshttps://realpython.com/quizzes/
Coding Exerciseshttps://realpython.com/coding-exercises/
Live Courseshttps://realpython.com/live/
Bookshttps://realpython.com/books/
Data Sciencehttps://realpython.com/start/data-science-analytics/
AI Apps & Agentshttps://realpython.com/start/ai-apps-agents/
Machine Learninghttps://realpython.com/start/machine-learning/
Automationhttps://realpython.com/start/scripting-automation/
Web Developmenthttps://realpython.com/start/web-development-apis/
Cybersecurityhttps://realpython.com/start/cybersecurity/
Podcasthttps://realpython.com/podcasts/rpp/
Newsletterhttps://realpython.com/newsletter/
Community Chathttps://realpython.com/community/
Office Hourshttps://realpython.com/office-hours/
Learner Storieshttps://realpython.com/learner-stories/
Plans & Pricinghttps://realpython.com/account/join/
Team Planshttps://realpython.com/account/join-team/
For Businesshttps://realpython.com/account/join-team/inquiry/
For Schoolshttps://realpython.com/account/join-team/education-inquiry/
Reviewshttps://realpython.com/learner-stories/
About Ushttps://realpython.com/about/
Teamhttps://realpython.com/team/
Mission & Valueshttps://realpython.com/mission/
Editorial Guidelineshttps://realpython.com/editorial-guidelines/
Sponsorshipshttps://realpython.com/sponsorships/
Careershttps://realpython.workable.com
Press Kithttps://realpython.com/media-kit/
Merchhttps://realpython.com/merch
https://www.youtube.com/realpython
https://x.com/realpython
https://www.linkedin.com/company/realpython-com
https://www.facebook.com/LearnRealPython
https://github.com/realpython/
Privacy Policyhttps://realpython.com/privacy-policy/
Terms of Usehttps://realpython.com/terms/
Securityhttps://realpython.com/security/
Contacthttps://realpython.com/contact/
https://realpython.com/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.