Siman 288
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א כֵּיצַד כּוֹתְבִין אֶת הַמְּזוּזָה, כּוֹתְבִין שְׁתֵּי פָּרָשִׁיּוֹת שְׁמַע (דְּבָרִים ו, ד ט) וְהָיָה אִם שָׁמוֹעַ (דְּבָרִים יא, יג כא) עַל דַּף אֶחָד בִּירִיעָה אַחַת, וְעוֹשֶׂה לָהּ רֶוַח מִלְּמַטָּה וְרֶוַח מִלְּמַעְלָה כְּמוֹ חֲצִי צִפֹּרֶן, וּבִתְחִלָּתָהּ יְשַׁיֵּר כְּדֵי לָגֹל אוֹתָהּ אַחַר שֶׁתִּכָּרֵךְ. וּבְסוֹפָהּ אֵין צָרִיךְ לְהַנִּיחַ כְּלָל (טוּר).
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. Rema: 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)