שולחן ערוך, יורה דעה רפ״ח
Shulchan Arukh, Yoreh De'ah 288
1במה והיאך נכתבת. ובו ט"ו סעיפים:כיצד כותבין את המזוזה כותבין שתי פרשיות שמע והיה אם שמוע על דף אחד ביריעה אחת ועושה לה ריוח מלמטה וריוח מלמעלה כמו חצי צפורן ובתחלתה ישייר כדי לגול אותה אחר שתכרך. (ובסופה אין צריך להניח כלל) (טור):
With what, and how, it is written.How is the mezuzah written? He writes two sections on one pane (daf) in a single sheet (yeri`ah): Shema` and Vehayah im-shamo`a. He leaves a space below and above, approx. half a pinkly-fingernail-width (tziporen). When beginning he should measure in order [to leave a top margin] to enable unrolling it after it's rolled. Rem"a: At the bottom he needn't leave any margin. (Tur)
2צריך לכתבה בדף אחד ואם כתבה בב' או בג' דפין כשרה:
It should be written in one [column] (daf) but if he wrote it on two or three [columns] it's kosher.
3כתבה שלא על הסדר אפילו שכח מלכתוב אות אחת פסולה ואין לה תקנה ואין צריך לומר אם הקדים פרשה לפרשה:
If he wrote out of order, even if he forgot one letter, it's invalid and irreparable; needless to say if he put the wrong paragraph first.
4כתבה בשני עורות אף על פי שתפרן פסולה:
If he wrote it on two parchments even if he stitched them it's invalid.
5צריכה עיבוד לשמה לכתחלה אבל במקום שאם ימתין לעור מעובד לשמה יתבטל מהמצוה יכתבנה על עור שאינו מעובד הנמצא ויקיים המצוה מיד בעוד שמבקש עור מעובד לשמה:
A priori the hide needs to be made for-the-mitzvah (lishmah). But where if he'll wait for hide that's made lishmah he will be delayed to do the mitzvah, then he should write it on available hide that is not made lishmah and perform the mitzvah immediately, while requesting hide that's made lishmah.
6כתבה על הקלף או על הגויל כשרה לא אמרו דוכסוסטוס אלא למצוה (וקלפים שלנו כשרים לכל) (מרדכי הלכות קטנות):
Whether written on qelaf (split leather) or gewil (unsplit leather), it's kosher. They did not restrict using dukhsustus (an inferior half of the split), but instead were saying the optimal mitzvah [is done on the aforementioned]. (Shabbat 79b) (And our qelafim are kosher by all opinions.) (Mordekhai halakhot ketanot)
7דינה לענין הדיו והכתיבה והתגין של שעטנ"ז ג"ץ כמו בספר תורה:
Its rules regarding the ink, writing, crowns of the letters Sh`ATNeZ GaTz, are same as for sefer torah.
8צריכה שרטוט ואם כתבה בלא שרטוט פסולה:
[The parchment] requires scored lines. If written without scoring, it's invalid.
9כותב כל שיטותיה שוות שלא תהא אחת ארוכה מחבירתה ואם האריך בשיטה אחת יותר מבאותה שלפניה ובאותה שתחתיה קיצר יותר מבאותה שלפניה ולפני פניה כשרה ובלבד שלא יעשנה כקובה או כזנב או כעיגול:
He writes all its lines equal-length; one should not be longer than another. If one line is longer than the previous or the next, or shorter than the previous or next, it's kosher. As long as it's not arched, or like a tail, or round.
10על הארץ יכתוב בראש השיטה אחרונה ולא יכתוב בה יותר:
`Al-ha'aretz/on the Land should be written at the head of the last line, and write nothing more after.
11נהגו לעשותה כ"ב שיטין:
The custom is to write it in 22 lines.
12צריך לכתבה בימין כמו בתפילין:
It needs to be written with the right hand, like tefilin.
13ריוח שבין פרשת שמע לפרשת והיה אם שמוע מצוה לעשות פרשה סתומה ואם עשאה פתוח' כשרה לפי שאינה סמוכה לה בתורה:
The space between paragraph Shema` and paragraph Vehayah im-shamo`a, it is a mitzvah to make it a closed space. If he made it an open space, it's kosher, since it's not adjacent in the Torah.
14כורכה מסופה לראשה מאחד כלפי שמע:
It is rolled from end to beginning, from Echad to Shema`.
15אסור להוסיף בה מאומה אלא שמבחוץ כותבין שדי כנגד תיבת והיה שבפנים: הגה וי"א נגד הריוח שבין הפרשיות (טור בשם הרא"ש ומרדכי ה"ק ורמב"ם והגה"מ בשם סה"ת) וכן נוהגין ומניחין נקב בקנה נגד שם שדי שיהא נראה מבחוץ (שם במרדכי והגמי"י) עוד נוהגין לכתוב מבחוץ כוז"ו במוכס"ז כוז"ו נגד ה' אלהינו ה' (טור) ויהפוך אלה האותיות מכתיבת המזוזה כדי שיגיע כל אות נגד האות שמתחלף בו באלפ"א בית"א (הגהמי"י) אבל בפנים אין להוסיף שום דבר על ב' פרשיות (טור ורמב"ם):
It is forbidden to add anything to it, except on the back side we write ShaDaY opposite the word Vehyah on the front.Rema: Some say opposite the space between the paragraphs (Tur in the name of RO"Sh, and the Short Mordekhai and Rambam and HGH"M [Hagahot Mordekhai] in the name of SH"T [Sefer haTerumot]). And that is the custom. And we leave a window in the case opposite the name ShDY so that it's visible from outside (there, in Mordekhai and HGMY"Y [Hagahot Maimoniyot]). We also have the custom to write on the outside KUZU BMUKS"Z opposite H' Eloheinu H', and write these letter upside-down versus the mezuzah writing, so that each letter touches opposite its replacement letter in the Alef-Beth (Hagahot Maimoniyot). But inside, add nothing at all besides the two paragraphs. (Tur and Ramam)