Skip to main content

מדריך טכני · ISO/IEC 18004

כיצד נוצרים קודי QR? תהליך הקידוד המלא

יצירת קוד QR היא יישום קדמי של קידוד ISO/IEC 18004: היא הופכת כתובת URL, טקסט או מטען נתונים למטריצת מודולים ריבועית עוד לפני הסריקה. מדריך 2026 זה מתמקד בצינור יצירת הסמל, מבחירת מצב הנתונים ועד הייצוא הסופי.

כיצד נוצרים קודי QR?

קודי QR נוצרים באמצעות קידוד נתוני הקלט לזרם ביטים, הוספת מילות קוד לתיקון שגיאות Reed-Solomon, מיפוי הביטים למטריצה ריבועית של מודולים, החלת תבנית מסכה מיטבית והוספת מידע על פורמט וגרסה לצד אזור שקט מחייב. מחולל QR תואם ממכן את תהליך ISO/IEC 18004 ומייצר סמל שחור-לבן הניתן לסריקה.

מה משמעותה של יצירת קוד QR?

יצירת קוד QR היא הפקת הסמל המאחסן מטען נתונים; היא שונה מסריקה, שמפענחת את הסמל, ומניהול הפניה דינמית שמתרחש לאחר שהסמל כבר קיים.

A QR code is a two-dimensional barcode symbology. Its black and white squares are modules, and their arrangement carries both payload data and the instructions a scanner needs to interpret it.

A QR generator analyzes input and applies the ISO/IEC 18004 rules for capacity, structure, and error correction. A scanner performs the reverse operation; for that decoding flow, see how QR codes work.

A static QR code stores its final payload in the symbol. A dynamic QR code stores a redirect URL in the same kind of symbol, while its editable destination and later analytics live outside the encoding process.

מהו צינור יצירת קוד QR?

תהליך יצירת קוד QR כולל עשרה שלבים דטרמיניסטיים: ניתוח קלט, קידוד, תיקון שגיאות, מבנה הודעה, בניית מטריצה, הצבת ביטים, בחירת מסכה, הוספת מידע על פורמט/גרסה, הוספת אזור שקט וייצוא.

הצינור הבא מתאים להערכת ספריית QR או להבנת פעולת המחולל על כתובת URL.

  1. 1

    Analyze input and choose a data mode

    The generator selects numeric, alphanumeric, byte, or Kanji encoding from the characters in the payload.

  2. 2

    Encode data into codewords

    Mode and character-count indicators, payload bits, a terminator, and padding are formed into eight-bit codewords.

  3. 3

    Generate error correction

    Reed-Solomon arithmetic creates redundant codewords for the selected recovery level.

  4. 4

    Structure the final message

    Data and error-correction blocks are interleaved in the order required by the selected version and level.

  5. 5

    Construct the matrix

    The generator chooses a QR version and reserves finder, timing, alignment, and information areas.

  6. 6

    Place data bits

    Codeword bits travel through remaining modules in a vertical zigzag pattern, with remainder bits where required.

  7. 7

    Evaluate mask patterns

    All eight XOR masks are scored to avoid patterns that are difficult for cameras to distinguish.

  8. 8

    Insert format and version information

    The chosen error-correction level and mask are BCH-protected; versions 7 and above also receive version information.

  9. 9

    Add the quiet zone

    A clear border at least four modules wide separates the symbol from neighboring artwork.

  10. 10

    Export and validate

    The finished matrix can be rendered as PNG, SVG, PDF, or EPS and tested at its intended print size.

צרו קוד QR בחינם לאחר סקירת התהליך

שלב 1: כיצד מחולל בוחר מצב נתונים?

בחרו מצב נתונים לפי קבוצת התווים, לא לפי שם סוג המטען. נתונים מספריים נדחסים בצורה היעילה ביותר, ואילו כתובות URL ומחרוזות WiFi דורשות לרוב מצב בתים כי הן כוללות אותיות קטנות וסימני פיסוק.

A data mode is the rule set used to convert characters into bits. A URL such as https://example.com commonly uses byte mode; a WiFi payload string also commonly uses byte mode, but has a different payload structure. See types of QR codes for format-selection guidance.

מצבקבוצת תוויםמתאים במיוחד ל
Numeric0–9Phone numbers, numeric IDs, and digits-only payloads
Alphanumeric0–9, A–Z, space, $ % * + - . / :Uppercase coupon codes and simple identifiers
ByteISO 8859-1 or arbitrary byte sequencesURLs, email, WiFi strings, mixed-case and UTF-8 text
KanjiShift JIS double-byte charactersEligible Japanese text
סוגי קודי QR

Step 2: How is data encoded into codewords?

Encoding converts the selected mode, character count, and payload into bits, then adds a terminator and pad bytes until the selected version's data capacity is filled.

A codeword is an eight-bit unit of either encoded payload data or error-correction information. The mode indicator tells the decoder how to read the following bits, and the character-count indicator tells it how much data follows.

Payload length and error-correction level determine the smallest QR version with enough capacity. A longer URL or a higher recovery level can therefore increase the module count even when the visible design is unchanged.

Step 4: How is the QR matrix built?

A QR matrix is the square grid of modules that holds fixed patterns, data modules, and error-correction modules. Version 1 contains 21×21 modules, and each higher version adds four modules per side.

Finder patterns are the three 7×7 corner markers that help a scanner locate and orient the code. Timing patterns synchronize the module grid, while alignment patterns improve geometric correction on larger versions.

The generator reserves areas for format information and, from Version 7 onward, version information before placing data. Version 40 reaches 177×177 modules.

Step 5: How are codewords placed in modules?

After fixed patterns are reserved, the generator places data and error-correction bits in paired columns that zigzag from the lower-right toward the upper-left of the matrix.

Each bit becomes one light or dark module after masking. Reserved function modules are skipped, and remainder bits fill any capacity that is not represented by a full codeword.

This placement rule is why a QR symbol is a structured matrix rather than a visual hash: every position has a prescribed role.

Step 6: What are QR code mask patterns?

Mask patterns are eight XOR templates applied to data modules to break up large uniform regions and repeated patterns that can make camera detection less reliable.

The generator evaluates all eight masks and assigns penalty points for undesirable runs, blocks, and balance. It uses the lowest-penalty result and records the selected mask in format information.

Masking changes the visual distribution of modules, not the underlying payload. The scanner reads the mask identifier and reverses the operation during decoding.

Step 7: What are format and version information?

Format information tells a scanner the error-correction level and selected mask; version information identifies versions 7 through 40. Both use BCH protection for reliable reading.

Format information is duplicated near the finder patterns because it is needed early in decoding. Version information is placed in reserved areas on larger symbols.

These fields are part of symbol generation, so a code that merely resembles a QR image is not necessarily a valid QR symbol.

Step 8: Why does the quiet zone matter in final output?

The quiet zone is a mandatory clear border of at least four modules on every side. It lets scanners distinguish finder patterns from surrounding text, artwork, and borders.

PNG is useful for fixed pixel output, while SVG, PDF, and EPS preserve vector edges for large-format printing. Raster scaling can blur individual modules, so print resolution must preserve a readable module size.

Use the QR code size guide for physical sizing rules; generation creates the symbol, while production choices determine how faithfully it is reproduced.

Static vs dynamic QR codes in the generation context

Both static and dynamic QR codes start with a generated symbol. A static symbol encodes its final payload, while a dynamic symbol encodes a redirect URL whose destination can be edited later.

The entity chain is encoding → symbol → optional redirect layer → editable URL → scan analytics. Analytics attach when a dynamic redirect is requested, not while the QR matrix is generated.

Read about static vs dynamic QR codes for the business decision, and see plans for dynamic features without assuming every generator exposes low-level version or mask controls.

What happens in a typical QR generator, including QR-Build?

A typical generator automates ISO/IEC 18004 encoding, then renders the finished symbol in the requested format. Design overlays such as color and logo treatments are applied after core symbol generation and must preserve contrast and capacity.

At QR-Build, we treat output validation as a production step: we review core symbol output and use cross-device scan tests on iPhone and Android before export. Compliant generators follow ISO/IEC 18004; implementation details and available controls vary, so verify them in vendor documentation.

Open-source libraries such as ZXing and qrcode.js implement the same core pipeline. Teams needing API-level evaluation can review our QR code generator for developers.

QR code generation vs QR code scanning

Generation encodes forward from data to modules; scanning decodes backward from modules to data. This page covers the forward pipeline only.

Understanding generation helps explain why quiet zones, module size, contrast, and error correction affect reliability. For the camera-detection and decoding sequence, read how QR codes work.

שלב 3: מהו תיקון שגיאות Reed-Solomon?

Reed-Solomon הוא קוד תיקון השגיאות המשמש בסימבולוגיית QR. הוא מוסיף מילות קוד עודפות לפני הצבת המטריצה, כדי שסורק יוכל לשחזר נתונים כאשר מודולים נפגמים או מוסתרים.

The percentages below are approximate recovery capacities commonly associated with each level; real results depend on where and how damage occurs. Higher correction reduces available data capacity for a given version and can require a larger symbol.

רמהיכולת שחזור משוערתשימוש טיפוסי
L~7%Clean digital displays with low damage risk
M~15%Common general-purpose default; confirm a generator's setting
Q~25%Outdoor placement or moderate wear
H~30%Logo overlays, heavy print, or harsher environments
המדריך לתיקון שגיאות QR

מסגרת החלטה למצבי נתונים ותיקון שגיאות

בחרו מצב נתונים לפי התווים המותרים ותיקון שגיאות לפי סיכון פיזי ועיצוב. רמה גבוהה יותר אינה בהכרח טובה יותר אם היא כופה מודולים קטנים מדי להדפסה הסופית.
מצבמצב נתוניםרמת ECעצת פלט
Phone number onlyNumericMUse SVG for print
Uppercase coupon codeAlphanumericMTest contrast
URL or WiFi stringByteM; H with a logoPreserve quiet zone
Logo overlayUsually byteHIncrease final print size
Outdoor signUsually byteQ or HCheck the size guide
Campaign with URL changesByte + dynamic redirectMUse a redirect layer and scan analytics

טעויות נפוצות ביצירת קוד QR

רוב כשלי הסריקה נובעים מבחירות הפקה סביב סמל שנוצר כהלכה: חיתוך האזור השקט, ניגודיות נמוכה, מודולים קטנים מדי או רמת שחזור שאינה תואמת לעיצוב.

Cropping the quiet zone

Do not place a border, text, or artwork inside the required clear margin.

Using too little error correction for a logo

A logo obscures modules; compensate deliberately and test the final artwork.

Forcing the wrong character encoding

Mixed-case text and non-ASCII content often need byte-aware handling rather than an alphanumeric assumption.

Reducing contrast

Decorative colors can make module boundaries difficult for cameras to separate.

Shrinking a raster file too far

Blurred or merged pixels can destroy module geometry even when the source matrix was valid.

Trusting a QR-like image

A square pattern must include valid structure, information fields, and quiet zone to be spec-compliant.

שיטות מומלצות ליצירת QR אמינה

השתמשו במחולל תואם מפרט, שמרו אזור שקט של ארבעה מודולים, התאימו תיקון שגיאות לתנאים הפיזיים ובדקו את הנכס המיוצא הסופי ביותר ממכשיר אחד לפני הפקה המונית.

Start with ISO/IEC 18004 output

Use a generator or library that documents standards-based QR encoding.

Match recovery to the environment

Factor in print wear, logo coverage, lighting, and expected viewing distance.

Keep the quiet zone intact

Treat the white border as part of the symbol, not as optional surrounding whitespace.

Test iOS and Android

Test the final printed or displayed asset, not only the source file on one screen.

Choose vector for large print

SVG, PDF, or EPS help preserve crisp module edges at larger dimensions.

Use dynamic QR codes for changing campaigns

An editable redirect destination avoids re-encoding when a campaign URL changes; scan analytics occur on that redirect layer.

מילון מונחים ליצירת קודי QR

הגדרות אלה מתארות חלקים מקושרים של תהליך אחד: מצב נתונים יוצר מילות קוד, מילות הקוד הופכות למודולים, והמודולים יוצרים סמל QR הכפוף ל-ISO/IEC 18004.

Module

One black or white square cell in a QR matrix.

Codeword

An eight-bit unit of encoded data or error-correction information.

Data mode

The character-encoding scheme selected before payload bits are created.

Error correction level

The L, M, Q, or H setting that controls redundant Reed-Solomon codewords.

Mask pattern

One of eight XOR templates used to improve module distribution.

Quiet zone

The required clear border of at least four modules around a QR symbol.

Finder pattern

One of the three large corner patterns that supports detection and orientation.

Alignment pattern

A smaller reference pattern that helps correct distortion in larger versions.

Timing pattern

Alternating modules that help synchronize the scanner to the grid.

Version

The QR size tier; Version 1 is 21×21 modules and each step adds four modules per side.

Format information

BCH-protected data identifying the error-correction level and selected mask.

Reed-Solomon

The error-correction algorithm that adds recoverable redundancy to QR codewords.

Static QR code

A symbol whose encoded payload remains fixed after creation.

Dynamic QR code

A symbol that encodes a redirect URL while its destination remains editable behind that redirect.

Related QR code resources

שאלות נפוצות

תשובות אלה עוסקות ביצירת סמלי QR, ולא במדריך הסריקה הנפרד או בטקסונומיה של פורמטי QR.

How are QR codes generated?

QR codes are generated by encoding input into bits, adding Reed-Solomon error correction codewords, placing data in a module matrix, applying a mask, inserting format and version information, and adding a quiet zone under ISO/IEC 18004.

What algorithm is used to generate QR codes?

QR generation follows ISO/IEC 18004. Its core algorithm includes data-mode selection, bit encoding, Reed-Solomon error correction, zigzag matrix placement, mask scoring, and format-information insertion.

How does a QR code generator turn a URL into a QR code?

A generator typically encodes an https URL in byte mode, selects a version from data length and error-correction level, constructs the module matrix, selects a mask, and exports the finished symbol.

What are QR code data modes?

Numeric, alphanumeric, byte, and Kanji modes define how characters convert to bits. Numeric is compact for digits, while byte mode handles URLs, mixed-case text, and arbitrary byte data.

When should I use byte mode versus alphanumeric mode?

Use byte mode for URLs, lowercase text, and special characters. Use alphanumeric mode only when the payload stays within its uppercase letters, digits, space, and limited-symbol set.

What is Reed-Solomon error correction in QR codes?

Reed-Solomon adds redundant codewords so a scanner can recover data when modules are damaged. Increasing from L through H generally increases recovery capacity while reducing data capacity for a version.

What are QR code mask patterns?

Eight mask patterns XOR with data modules to prevent large uniform regions and repeated structures. The generator scores each result and selects the lowest-penalty mask.

How many modules are in a QR code?

Module count depends on version. Version 1 is 21×21 modules, each version adds four modules per side, and Version 40 is 177×177 modules.

How is QR code version determined?

A generator selects the smallest version that fits the payload under the chosen data mode and error-correction level. More data or higher recovery requires more capacity.

Does generating a QR code require an internet connection?

No. Generation is local computation. Internet is only needed to use a cloud service or to access content at a URL encoded in the finished symbol.

What is the difference between generating and printing a QR code?

Generation creates a digital symbol; printing reproduces it on a physical surface. Final scan reliability depends on contrast, module size, quiet-zone preservation, and print quality.

Can I change a QR code after it is generated?

A static QR code has fixed encoded data. A dynamic QR code can keep its symbol while changing the destination behind its redirect URL; visual changes still require a safe re-export.

What is a quiet zone and why does it matter?

The quiet zone is a clear border of at least four modules around a QR symbol. Cropping it can prevent scanners from finding the symbol reliably.

What happens when you click Generate in QR-Build?

QR-Build processes the supplied content through the QR encoding pipeline, applies optional design treatments, and exports a scannable symbol. Dynamic QR workflows also register a redirect URL for later editing and analytics.

מוכנים להפוך נתונים לקוד QR?

השתמשו ב-QR-Build ליצירת סמל QR מבוסס תקנים, ולאחר מכן אמתו אותו בסביבה שבה אנשים יסרקו אותו.

צרו קוד QR עם QR-Build
QR Code - QR-Build

צרו את קוד ה-QR שלכם

יצירת קוד QR