Skip to content
CalcTide logo
Tech

QR Code Generator

A QR code generator turns text into a scannable square image that phones, tablets, and camera apps can read in seconds. This QR code generator lets you paste a website address, contact details, a short note, or any other plain text, then choose an output size from 128 to 1024 pixels and create a PNG in your browser. Because the page also reports the cleaned input length, it gives you a quick check before you print a label, add a code to packaging, or post a link on a sign where every scan needs to work the first time. The tool is best for static content that should stay the same after you generate it. If your input is clear, the size matches the final use, and you test the result on a real device, you can move from raw text to a downloadable QR code without installing software or sending the content to a remote service.

TechBy

Quick answer

The tool trims blank space at the beginning and end of your entry before it validates the content.

What this tells you

  • •The tool trims blank space at the beginning and end of your entry before it validates the content.
  • •A valid entry needs non-empty text plus a size between 128 and 1024 pixels.
  • •The Input Length result shows the number of characters in the trimmed text, which helps you spot accidental spaces or pasted extras.
  • •Shorter text usually produces a simpler QR pattern, which tends to scan more easily on small stickers and printed cards.
  • •The code is generated in the browser, so you should still scan the final image yourself before you publish, print, or email it.

How to Use

  1. 1Enter the text or URL you want people to open when they scan the code. Paste the exact final version, not a draft link you still plan to change.
  2. 2Choose a size in pixels. Smaller sizes are fine for on-screen sharing, while larger sizes are better for posters, packaging, or anything that may be scanned from farther away.
  3. 3Click Generate QR Code to create the image and review the Input Length and Size fields shown with the result.
  4. 4Download the PNG and place it where people will use it. Keep enough white space around the code so the camera can separate the pattern from the background.
  5. 5Scan the saved image with at least one phone camera and, if possible, one printed test copy. Confirm that the destination text opens correctly and that the code is still easy to read at the final display size.

How It Works

Formula

Valid QR input = trimmed text with length greater than 0, plus a selected size from 128 to 1024 px

The calculation layer for this tool is simple and practical. It trims the raw text, checks that something remains after trimming, converts the selected size to a number, and rejects any size outside the 128 to 1024 pixel range. When the input passes validation, the tool reports valueLength as the trimmed text length and returns the chosen size so the page can show both values with the generated image. In plain terms, the main checks are whether your text is empty after cleanup and whether your size fits the allowed output range. After that validation step, the browser encodes the same trimmed text into the QR image you download.

Calculation note: values are processed in the order shown above, using the current input units.

Worked Examples

Table tent menu for a 14-table cafe

Inputhttps://www.example.com/menu
Size512
ResultValid input, 28 characters, 512 px QR code ready to download

Priya is replacing laminated menus with a QR code on each table tent. The URL has 28 characters after trimming, so Input Length shows 28 and the 512 px size passes validation. At the generator's level M, 28 bytes is 2 more than a version 2 symbol holds (26), so the library builds version 3, a 29 by 29 module grid. With the 1-module margin that is 31 modules across 512 px, about 16.5 px per module. Printed 40 mm wide, each module is about 1.3 mm, and the 10 to 1 rule of thumb puts a comfortable scan distance near 40 cm, which is where a seated guest holds a phone.

Promo page URL for a window display

Inputhttps://shop.example.com/sale?src=window
Size384
ResultValid input, 40 characters, 384 px QR code ready to download

This URL has 40 characters after trimming, which matches the valueLength returned by the validation logic. A 384 px image gives more room for a clean pattern than a very small code, which helps when people scan through glass or from a few steps away. The example also shows why longer URLs deserve a quick scan test before printing.

Pickup instructions for a package label

InputOrder 48291 Pickup 4:30 PM Bay 2
Size512
ResultValid input, 32 characters, 512 px QR code ready to download

The text string contains 32 characters, so the tool reports Input Length as 32 and accepts the 512 px size. This kind of plain-text QR code works well when a staff member only needs to read short pickup details instead of opening a website. The larger image size gives printers more pixels to work with on labels and taped signs.

Contact text for a business card insert

InputJordan Lee, 206-555-0198, [email protected]
Size256
ResultValid input, 44 characters, 256 px QR code ready to download

After trimming, the contact line contains 44 characters. The validation step accepts it because the text is not empty and 256 falls inside the allowed size range. This example is useful for a small card insert where you want a compact code but still need to confirm that the camera can read it quickly.

Visitor note for a temporary office sign

InputFront door code 4821. Visitor parking in back.
Size640
ResultValid input, 46 characters, 640 px QR code ready to download

The note contains 46 characters once trimmed, so valueLength is 46 and the tool accepts the 640 px output size. A larger image makes sense when the code includes a full sentence and may be taped near an entrance where people scan from uneven angles. It is still important to test a printed copy because paper texture, glare, and distance can affect real scans.

QR code capacity by error-correction level

Maximum characters one symbol holds at each version and error-correction level, listed as numeric / alphanumeric / byte mode. The percentage is the approximate share of the symbol's codewords that the level can recover after damage. Lowercase URLs and most plain text encode in byte mode, and this page's generator uses level M.

Version (modules)L (about 7%)M (about 15%)Q (about 25%)H (about 30%)
1 (21 x 21)41 / 25 / 1734 / 20 / 1427 / 16 / 1117 / 10 / 7
2 (25 x 25)77 / 47 / 3263 / 38 / 2648 / 29 / 2034 / 20 / 14
3 (29 x 29)127 / 77 / 53101 / 61 / 4277 / 47 / 3258 / 35 / 24
4 (33 x 33)187 / 114 / 78149 / 90 / 62111 / 67 / 4682 / 50 / 34
10 (57 x 57)652 / 395 / 271513 / 311 / 213364 / 221 / 151288 / 174 / 119
20 (97 x 97)2,061 / 1,249 / 8581,600 / 970 / 6661,159 / 702 / 482919 / 557 / 382
40 (177 x 177)7,089 / 4,296 / 2,9535,596 / 3,391 / 2,3313,993 / 2,420 / 1,6633,057 / 1,852 / 1,273

Source: ISO/IEC 18004:2015 (QR Code bar code symbology specification), data capacity and error-correction level tables. Byte capacity assumes 8 bits per character, so an ASCII-only URL uses one byte per character. Cross-checked against the open-source qrcode library that renders the image on this page.

What makes one QR code easier to scan than another?

The first factor is content length, because length sets the symbol version. A 28-character menu URL at level M needs version 3, a 29 by 29 module grid, while a 90-character tracking link needs version 6 and a 41 by 41 grid. At a fixed print size, every extra row of modules makes each module smaller, which is exactly what older phone cameras struggle with. That is why the Input Length result matters even though the tool does not score scan difficulty directly.

The second factor is output size, and the useful unit is the module, one black or white square. The PNG from this page adds a 1-module margin, so a version 3 symbol spans 31 modules across the image, about 16.5 px per module at 512 px and about 8 px at 256 px. Match the pixel size to the final use: 128 px is enough for on-screen sharing, 256 px suits business cards and small handouts, 512 px prints cleanly on labels, flyers, and counter signs, and 1024 px leaves room for posters and design exports. A common rule of thumb for scan distance is 10 to 1. A code printed 30 mm wide scans comfortably from about 30 cm, and a poster read from 3 m needs a code about 30 cm wide. The tradeoff is file size and layout space, not a change in the encoded text.

Contrast and quiet space also matter. ISO/IEC 18004:2015 specifies a quiet zone 4 modules wide on all four sides of the symbol, and the download from this page carries only a 1-module margin, so leave extra white space in your layout. A dark code on a light background with nothing else inside that zone performs better than a code crowded by logos, borders, or patterned backgrounds. Avoid inverted codes and low-contrast brand colors unless you have tested them on several phones.

The final check is always a real scan. A code that works on one phone may hesitate on another if the screen is dim, the paper is glossy, or the camera app is slower to focus. Generating the image is only the first step. Testing the exact file in its final setting is what turns a valid QR code into a reliable one.

The generator encodes exactly the trimmed text you enter, one byte per ASCII character. It cannot shorten a URL, so a long tracking link produces a denser symbol than a short link to the same page (compare the byte columns in the capacity table above, from ISO/IEC 18004:2015). Characters outside ASCII take 2 to 4 bytes each in UTF-8, so Input Length can understate the space they use. Wi-Fi and contact payloads are conventions layered on top of the standard, not part of it: the WIFI: prefix format comes from the ZXing barcode project's documentation, and contact cards follow the vCard format in RFC 6350 or NTT Docomo's MeCard layout. Most phone cameras read them, but ISO/IEC 18004 does not define them, so test the exact payload on the devices your audience uses.

Print quality is outside its control. Level M error correction restores about 15% of the symbol's codewords (ISO/IEC 18004:2015), which covers small scuffs but not a logo pasted over the center, a missing quiet zone, or a label printed at a resolution where neighboring modules blur together. Validation here only confirms that the text is not empty and that the size sits between 128 and 1024 px. Everything after the download, from paper stock and ink spread to glare and camera focus, depends on the print job and the phone.

Common mistakes

  • Pasting a draft or temporary URL, then printing the QR code before the final page is live.
  • Choosing the smallest size for a long text string and expecting it to scan well on paper.
  • Forgetting that the tool trims edge spaces, which can change the Input Length from what you expected.
  • Placing the QR image on a busy background with too little blank space around it.
  • Skipping a real phone scan and assuming a generated image is automatically ready for public use.

Embed this calculator on your site

Paste this code where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use as long as the credit line stays in place.

<script src="https://calctide.com/embed.js" data-tool="qr-code-generator" async></script> <p style="font-size:12px;margin:4px 0 0">QR Code Generator by <a href="https://calctide.com/tech/qr-code-generator/">CalcTide</a></p>

Preview the embed at /embed/qr-code-generator/.

Frequently Asked Questions

No. The page generates the QR code in the browser. You should still avoid sharing sensitive text in any public screenshot, design draft, or printed sample because anyone who scans the code can read the encoded content.
Yes. The tool accepts either a website address or regular text. The only required rule in the validation file is that the trimmed entry cannot be empty and the selected size must stay within the allowed range.
Input Length matters because it tells you exactly how many characters remain after trimming. That helps you catch pasted junk, accidental spaces, or a link that became longer than expected. In practice, shorter content also tends to produce a simpler code that is easier to scan at small sizes.
Start with 256 px for general digital sharing and move up to 512 px or more for print. The best size depends on how much text you encode, how large the final printed code will be, and how far away people will stand when they scan it. If the use case matters, generate two sizes and test both.
No. It only trims blank space at the beginning and end of the entry. Spaces, punctuation, and line breaks inside the text stay part of the final QR content, so check the exact message before you download the image.
No. A downloaded QR image is tied to the text used when you generated it. If you need different content, create a new code from the corrected text or final URL and replace the old image everywhere it appears.
A generated code can still fail because validation is not the same as scan testing. Long text, low contrast, glare, tiny print, damaged labels, or camera focus issues can all hurt reliability. That is why a real device test matters before you publish the code widely.
Usually no. QR codes work best when the content is short and the action is clear, such as opening a page, showing contact details, or displaying a brief instruction. If the text becomes long, the pattern grows denser and the code often needs a larger printed size to stay easy to scan.
It estimates qr code generator outputs using the visible inputs and formula assumptions on this page.

Explore More in Tech