Overview
Plain text QR codes encode simple text strings that are displayed to the user when scanned. Unlike URL QR codes that open a browser, text QR codes simply show the encoded message on the scanning device’s screen. This is useful for sharing messages, instructions, serial numbers, or any textual information.Data Structure
Plain text QR codes use theTextQrData interface:
The text content to encode in the QR code. Can contain any characters, but must be between 1 and 2953 characters in length.
Encoding Format
The text encoder (from/src/domain/encoders/encoders.ts:11-13) is straightforward:
Validation Rules
The validator (from/src/domain/validation/validators.ts:39-54) enforces these requirements:
Required Field
Required Field
- The
textfield cannot be empty or contain only whitespace - Error message: “El texto es obligatorio”
Minimum Length
Minimum Length
- After trimming, the text must have at least 1 character
- Error message: “El texto debe tener al menos 1 carácter”
Maximum Length
Maximum Length
- The text cannot exceed 2953 characters
- This limit ensures the QR code remains scannable
- Error message: “El texto es demasiado largo (máximo 2953 caracteres)“
Validation Implementation
Usage Example
Common Use Cases
- Instructions: Embed assembly or usage instructions
- Serial Numbers: Share product serial numbers or license keys
- Messages: Display welcome messages or information
- Codes: Share access codes, passwords, or reference numbers
- Descriptions: Provide product descriptions or specifications
- Quotes: Share memorable quotes or messages
Character Limit Considerations
While the maximum character limit is 2953, keep in mind:- Longer text creates denser, more complex QR codes
- Very dense QR codes may be harder to scan, especially from a distance
- For best scannability, keep text concise (under 500 characters recommended)
- Consider breaking very long content into multiple QR codes