Generate QR code SVGs with a simple API
Use a simple endpoint to generate static QR SVGs for technical workflows.
Generate QR SVGs
SVGSend text or a URL in the query string and receive static SVG QR artwork.
/api/qr?text=https%3A%2F%2Fqrcodeq.com&size=512&margin=4Parameters
Query- text or data
- The value encoded in the QR code, up to 2048 characters (413 above that). Defaults to https://qrcodeq.com when missing. Keep private data out of URL query strings.
- size
- Optional SVG width in pixels, default 512. Values are clamped between 128 and 2200. Non-numeric values fall back to the default.
- margin
- Optional quiet zone around the QR code, default 4. Values are clamped between 0 and 10. Non-numeric values fall back to the default.
- rate limit
- 120 requests per minute per IP. Responses are cacheable for one hour, so cache repeated outputs on your side.
When to use the QR Code API
The API is intentionally plain: send text, get an SVG. It is not a secret store and should not be used for private data that you would not put in a URL.
Make API output repeatable
QR generation in an app should produce the same file from the same request.
- Pass final content, size and colors from your own validation layer.
- Save the format choice with the asset record.
- Test one generated image before adding batch traffic.
For print systems, predictable parameters matter more than clever defaults.
Generate a QR SVG from the API
- Build a request URL with the text or data you want encoded.
- Use the returned SVG in internal tools, docs, dashboards or quick prototypes.
- Keep sensitive data out of URL query strings.
- Cache generated images where appropriate instead of repeatedly requesting the same code.
- Scan the output before using it in production material.
Where the QR API fits
- Internal dashboards
- Documentation pages
- Quick prototypes
API input checks
- The QR API is useful for internal dashboards, docs, prototypes and automated previews.
- Use POST or a server-side workflow later if private or long data becomes a requirement.
- Static QR output is easy to cache because the same input should produce the same visual result.
QR API mistakes to avoid
- Putting private tokens, passwords or personal data in a URL query string.
- Calling the API repeatedly for the same value instead of caching stable SVG output.
- Using API-generated artwork in production without scanning the exact rendered code.
QR Code API questions
What does the QR Code API return?
It returns static SVG QR code artwork for the text or data in the request.
Should I put private data in the API URL?
No. Query strings can appear in logs, browser history and analytics. Keep private data out of simple URL-based requests.
Can I embed the SVG in a page?
Yes. The endpoint is useful for internal pages, documentation, dashboards and quick generated previews.
Can I request PNG from the QR API?
The public endpoint returns SVG because it stays sharp at different sizes and is easy to cache. Use the browser tool when you need PNG or PDF downloads.
How should I cache API output?
Cache by the full request URL. If the encoded text, size and margin are the same, the SVG can be reused instead of requested again.
Why does the API return SVG instead of PNG?
SVG is a vector format that stays sharp at any size, from a thumbnail to a poster. It is also lightweight and easy to cache. If you need a raster image, convert the SVG to PNG on your server or use the browser tool.
Can I use the QR API for high-volume automated workflows?
The API is designed for internal tools and moderate use. For very high volume, consider generating QR codes locally with an open-source library so you don't depend on an external endpoint.
Is the API output the same every time for the same input?
Yes. The same text, size and margin settings produce the same SVG output, which makes caching straightforward. Store the result locally and skip the API call when the input has not changed.
More tools for technical workflows
Free QR Code Generator
Create a static QR code for the everyday jobs people actually print and share.
URL QR Code Generator
Paste a link and turn it into a scannable QR code for printed materials.
Bulk QR Code Generator
Generate a set of QR files from a CSV without sending the sheet to a server.
Barcode API
Generate barcode SVGs from a simple endpoint for internal tools and prototypes.