Generators for identifiers and QR codes.
Two generators that have more in common than they look: both produce something you will paste somewhere permanent, and both are safer made on your own machine than fetched from a server.
A QR code encoding your home WiFi password, or a UUID that will become a primary key, is not something to fetch from an API. Both generators here run entirely in the page: the UUID comes from the operating system's cryptographic random source, and the QR code is drawn on a canvas in your browser. Neither the identifier nor the encoded content is ever transmitted.
Which generator do you need?
Two tools, with quite different reasons for running locally.
| If you want to… | Use | Worth knowing |
|---|---|---|
| Create a unique identifier for a record, file or request | UUID Generator | Version 4, 122 random bits. Collisions are not impossible, merely so unlikely that you can design as if they are. |
| Encode a URL, WiFi network, contact card, email or event as a QR code | QR Code Generator | Download as PNG or SVG. Use SVG for anything that will be printed — it scales without softening. |
All 2 generators
Both have their own page with the format details and the practical limits.
What a UUID guarantees, and what it does not
A version 4 UUID is 128 bits, of which 122 are random — the remaining six identify the version and variant. It is written as 36 characters in the familiar 8-4-4-4-12 grouping.
The appeal is that it needs no coordination. Any number of machines can generate identifiers simultaneously, with no shared counter and no central authority, and still not collide. The probability is small enough to be worth stating concretely: you would need to generate about 2.7 quintillion UUIDs before reaching a 50% chance of a single collision. An application producing a million a second would wait longer than the age of the universe. Collision is not a risk you need to engineer around.
What a UUID does not give you is secrecy or unguessability-by-design. Version 4 UUIDs are generated from a cryptographic random source, so they are in practice unguessable — but a UUID in a URL is still a bearer token, and treating "unguessable" as "access controlled" is a recurring source of data exposure. If a document is private, check authorisation; do not rely on the URL being hard to type.
Nor is version 4 the right choice everywhere. The random layout means consecutive UUIDs land in unrelated places in an index, which fragments B-tree indexes and hurts insert performance in large tables. Databases under heavy insert load often prefer a time-ordered identifier — UUID v7, or a database-native sequence — specifically to keep inserts local. For a primary key on a moderate table, v4 is fine and the simplicity is worth more than the index locality.
QR codes carry more than links
A QR code is just a container for a text string. What makes a scan do something is a formatting convention the scanning app recognises.
- URL — a plain
https://…string. The most common case, and the one every scanner handles. - WiFi — a
WIFI:S:<ssid>;T:WPA;P:<password>;;string that joins the network on scan. Genuinely useful for guest access, and the reason local generation matters: the password is in the code. - vCard — a full contact record that saves to the address book in one step. Common on business cards and conference badges.
- Email, SMS and phone — pre-fill a message or dial a number, using the same
mailto:,smsto:andtel:schemes browsers use. - Calendar event — an iCalendar block that offers to add the event with its time and location.
Scanner support for the non-URL types is good on modern phone cameras and inconsistent on older third-party apps. For anything printed at scale, test with at least two devices before committing to a print run.
Making a QR code that reliably scans
Most unscannable QR codes fail for one of four reasons, all avoidable at generation time.
Too much data. A QR code grows denser as content lengthens, and beyond a point the modules become too fine to resolve. Long URLs with tracking parameters are the usual offender — shortening the URL produces a visibly coarser, more robust code. If the preview looks like noise, it has too much in it.
Insufficient error correction. QR supports four levels, L through H, reconstructing roughly 7%, 15%, 25% and 30% of damaged data respectively. Higher levels make the code denser but survive dirt, creases and partial obstruction. Use M for screens, and Q or H for anything printed, outdoors, or with a logo overlaid on the centre — that logo is deliberate damage, and only a high level absorbs it.
Inverted or low contrast. Scanners expect dark modules on a light background. Light-on-dark fails on a large share of readers, and subtle colour pairings fail in poor light. Keep strong contrast, and keep the quiet zone — the blank margin of at least four modules — clear. Cropping that margin to make a code fit is a common and fatal layout decision.
Printed too small. The working rule is that the code's width should be about a tenth of the intended scanning distance: 2 cm for 20 cm (a business card), 10 cm for a metre, and a very large code for a billboard. Below roughly 2 cm, phone cameras struggle regardless of content.
Finally, prefer SVG for print. It is resolution-independent, so it stays crisp at any size, while a PNG scaled up for a poster produces soft module edges that cost you scan reliability.
The case against server-side generation
Both tools here could trivially be API calls. They are not, for reasons specific to each.
For UUIDs, the issue is the random source and the record of it. A server-generated identifier is known to the server that made it. For most uses that is harmless; for a session token, an unguessable share link or an idempotency key it is not. Generating locally with crypto.getRandomValues() means the value exists on your machine and nowhere else.
For QR codes, the issue is the content. A WiFi QR code contains your network password in plain text. A vCard contains a person's full contact details. Sending those to a generator service means handing over exactly the thing the code exists to transmit privately — and many free QR services do something worse: they return a code pointing at a redirect on their domain, so they can count scans and, in some cases, change the destination later or begin charging for it. A QR code printed on a thousand business cards that stops working when a service sunsets is a real and recurring failure.
The code produced here encodes your content directly. There is no redirect, no tracking, no dependency on this site continuing to exist, and no expiry. Once generated, it works forever and offline.
Frequently asked questions
Are generated UUIDs or QR codes sent to a server?
No. Both are produced entirely in your browser. The UUID comes from the Web Crypto API and the QR code is drawn on a canvas locally, so neither the identifier nor the encoded content is transmitted.
Could two UUIDs ever collide?
In principle yes, in practice no. You would need roughly 2.7 quintillion v4 UUIDs for a 50% chance of one collision. It is safe to design as though it cannot happen.
Is a UUID in a URL secure enough to protect private content?
Treat it as a bearer token, not as access control. v4 UUIDs are unguessable in practice, but anyone who obtains the link has access. Genuinely private content needs an authorisation check.
Do the QR codes expire or track scans?
Neither. The code encodes your content directly rather than pointing at a redirect on this domain, so there is nothing to expire, nothing counting scans, and no dependency on this site staying online.
Should I download PNG or SVG?
SVG for anything printed, since it stays sharp at any size. PNG is fine for screens and for pasting into documents that do not accept vector formats.
What error correction level should I pick?
M for on-screen use. Q or H for printed codes, outdoor placement, or any code with a logo over the centre — the logo is damage, and only a higher level absorbs it.
Why won't my QR code scan?
Usually one of four things: too much data making the modules too fine, a missing quiet zone around the edge, light-on-dark colouring, or printing below about 2 cm. Shortening the content fixes the first and is the most common cure.