# Ensō QR Generator > Make styled QR codes with one HTTP request to https://qr.enso.no/gen. Send type=... and that type's fields; get back a PNG, an SVG, or the code drawn as text for a terminal. > No API key, no sign-up. Requests are not stored or logged. ## Quick start POST the fields as a form or JSON body. Prefer this: the body stays out of server logs, proxies and shell or browser history. ```sh curl -o wifi.png https://qr.enso.no/gen --data-urlencode "type=wifi" --data-urlencode "ssid=EnsoGuest" --data-urlencode "password=hemmelig" curl -o enso.svg https://qr.enso.no/gen -H "Content-Type: application/json" -d '{"type":"url","url":"enso.no","format":"svg","style":"bw"}' curl https://qr.enso.no/gen --data-urlencode "type=wifi" --data-urlencode "ssid=EnsoGuest" --data-urlencode "password=hemmelig" --data-urlencode "format=txt" # prints the encoded string ``` For public content such as a web link, a plain GET with the same fields as query parameters also works: ```sh curl -o enso.png "https://qr.enso.no/gen?type=url&url=enso.no" curl "https://qr.enso.no/gen?type=url&url=enso.no&format=term" # prints the code in the terminal, ready to scan curl "https://qr.enso.no/gen?type=url&url=enso.no&format=ansi" # the same in the Ensō colours ``` Rules that matter: - Always use the full https://qr.enso.no/gen URL, including the scheme. Plain http:// is refused with HTTP 403, and a bare host makes curl fall back to http://. - Use POST for anything private: WiFi passwords, contact details, phone numbers, events. A GET puts every field in the URL. - POST bodies are application/x-www-form-urlencoded (what curl -d and --data-urlencode send) or a flat JSON object. Up to 16 KB. - With POST, every field goes in the body. A POST that also has a query string is rejected. - With curl, use --data-urlencode for each field so spaces, +, @ and & arrive intact. Plain -d does not encode. - With GET, quote the whole URL in a shell and percent-encode values: space %20, + %2B, @ %40, # %23, & %26. - Write images to a file with `-o`; PNG bytes on a terminal are useless. To see the code in a terminal, use format=term. - Parameter names are case-insensitive. Unknown parameters are rejected, not ignored. - On a bad request you get HTTP 400 with JSON: {"error": ..., "errors": [{"param", "message"}]}. Fix the named params and retry. - HTTP 422 means the content is valid but too long for a QR code. - A response header X-QR-Warning, when present, flags a style that may scan poorly. - format=txt returns the exact string the code would contain. Use it to check a payload before rendering. - format=term draws the code with Unicode block characters; format=ascii uses # for terminals and logs that garble Unicode. Both are plain black and white: style, colours, size, margin and logo are rejected. They suit a dark terminal; add invert=true on a light one. - format=ansi draws the code in Unicode blocks coloured with 24-bit ANSI escapes, in the chosen style (style, fg, bg, eye), on any terminal background. It needs a terminal with 24-bit colour, and saved to a file it keeps the escape codes. Dot shapes, size, margin and logo are rejected. Corners too faint to scan in blocks are drawn in the dot colour. ## Common parameters - type: Content type. One of: url, vcard, wifi, email, phone, sms, text, event, geo. Default url. - format: png (default), svg, txt (the raw string encoded in the code, for checking), term (the code drawn in Unicode blocks, to print in a terminal), ascii (the same with # characters), or ansi (Unicode blocks in the style colours, for terminals with 24-bit colour). - style: Preset. One of: enso, bw, hippie, night, warm, custom. Default enso. - logo: true (default) or false. The Ensō mark in the centre. - size: Width and height in pixels, 128-4096. Default 1024. - margin: Quiet zone around the code in pixels. Default is 8% of size. - fg: Custom dot colour as hex, e.g. 0e0e0e (the # is optional). Implies style=custom. - bg: Custom background colour as hex. Implies style=custom. - eye: Custom corner colour as hex. Implies style=custom. - dot: Custom dot shape: square, rounded, dots, extra-rounded, classy. Implies style=custom. - invert: With format=term or ascii: true for a terminal with a light background. The default suits dark ones. Not needed for ansi, which brings its own colours. - download: true to send the file as an attachment instead of inline. ## Content types and their fields ### type=url (aliases: link): Link - url (required; e.g. enso.no): Web address A bare host such as enso.no gets https:// prepended. `site`, `link`, `data` and `value` are accepted as aliases for `url`. ```sh curl -o qr-url.png https://qr.enso.no/gen --data-urlencode "type=url" --data-urlencode "url=enso.no" ``` ### type=vcard (aliases: contact): Contact - firstName (optional; e.g. Kari): First name - lastName (optional; e.g. Nordmann): Last name - org (optional; e.g. Ensō): Organisation - title (optional; e.g. Developer): Job title - phone (optional; e.g. +47 123 45 678): Phone - email (optional; e.g. post@enso.no): Email - url (optional; e.g. enso.no): Website At least one of firstName, lastName, phone or email is required. ```sh curl -o qr-vcard.png https://qr.enso.no/gen --data-urlencode "type=vcard" --data-urlencode "firstName=Kari" --data-urlencode "lastName=Nordmann" --data-urlencode "phone=+4712345678" --data-urlencode "email=post@enso.no" ``` ### type=wifi: WiFi - ssid (required; e.g. EnsoGuest): Network name (SSID) - password (optional; e.g. Leave empty for an open network): Password - encryption (optional; one of WPA, WEP, nopass): Security - hidden (optional; true or false): Hidden network encryption defaults to WPA. Use encryption=nopass for an open network. ```sh curl -o qr-wifi.png https://qr.enso.no/gen --data-urlencode "type=wifi" --data-urlencode "ssid=EnsoGuest" --data-urlencode "password=hemmelig" --data-urlencode "encryption=WPA" ``` ### type=email: Email - to (required; e.g. post@enso.no): To - subject (optional; e.g. Hei): Subject - body (optional; e.g. Optional prefilled message): Message ```sh curl -o qr-email.png https://qr.enso.no/gen --data-urlencode "type=email" --data-urlencode "to=post@enso.no" --data-urlencode "subject=Hei" ``` ### type=phone: Phone - phone (required; e.g. +47 123 45 678): Phone number ```sh curl -o qr-phone.png https://qr.enso.no/gen --data-urlencode "type=phone" --data-urlencode "phone=+4712345678" ``` ### type=sms: SMS - phone (required; e.g. +47 123 45 678): Phone number - message (optional; e.g. Optional prefilled message): Message ```sh curl -o qr-sms.png https://qr.enso.no/gen --data-urlencode "type=sms" --data-urlencode "phone=+4712345678" --data-urlencode "message=Hei" ``` ### type=text: Text - text (required; e.g. Any text you like): Text ```sh curl -o qr-text.png https://qr.enso.no/gen --data-urlencode "type=text" --data-urlencode "text=Hello world" ``` ### type=event: Event - title (required; e.g. Ensō frokostseminar): Title - location (optional; e.g. Oslo): Location - startDate (required; YYYY-MM-DD): Start date - startTime (optional; HH:MM, 24-hour): Start time - endDate (optional; YYYY-MM-DD): End date - endTime (optional; HH:MM, 24-hour): End time - description (optional; e.g. Optional details): Description Times are local wall-clock time in Europe/Oslo. Without an end, the event lasts one hour. An end date without an end time means the end of that day. ```sh curl -o qr-event.png https://qr.enso.no/gen --data-urlencode "type=event" --data-urlencode "title=Frokostseminar" --data-urlencode "startDate=2026-11-03" --data-urlencode "startTime=08:30" --data-urlencode "endTime=10:00" --data-urlencode "location=Oslo" ``` ### type=geo (aliases: location): Location - lat (required; e.g. 59.9139): Latitude - lng (required; e.g. 10.7522): Longitude Decimal degrees. Latitude -90 to 90, longitude -180 to 180. ```sh curl -o qr-geo.png https://qr.enso.no/gen --data-urlencode "type=geo" --data-urlencode "lat=59.9139" --data-urlencode "lng=10.7522" ``` ## Styles - enso: Ensō. - bw: Black & white. Highest scan reliability. Best choice for print. - hippie: Hippie. - night: Night. Inverted codes can fail on older scanners. Test before printing. - warm: Warm. - custom: Custom. For print, or when scanning reliability matters most, use style=bw. With logo=true (the default) the code uses error correction level H, which holds less data. Long content fits better with logo=false. ## Other endpoints - https://qr.enso.no/api: the same reference as JSON. - https://qr.enso.no/: the interactive web app.