Siman 218
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 Someone who sees a place where miracles were done for Israel, such as: the crossing of the sea, the crossing of the Jordan, the crossing of the Rivulets of Arnon, the stones of Elgavish of Beit Choron, the stone which Og wanted to throw on Israel, the stone that Moshe sat on during the war of Amalek, and the walls of Jericho, should bless as follows: "she'asah nissim la'avoteinu bamakom hazeh" - "who wrought miracles for our forefathers at this place." And both this blessing and the other blessings made upon seeing things, are like all other blessings; they are all recited with the mention of God's Name and Kingship.
ב עַל נֵס שֶׁנַּעֲשָׂה לִקְצָת יִשְׂרָאֵל כָּל זְמַן שֶׁלֹּא נַעֲשָׂה לְכָל יִשְׂרָאֵל אוֹ רֻבָּן, וַאֲפִלּוּ נַעֲשָׂה לִקְצָת שְׁבָטִים, אֵין מְבָרְכִין עָלָיו.
2 On a miracle which was done for part of Israel: as long as it was not done for all of Israel, or the majority, even if it was done for a minority of tribes, we do not make the blessing on it.
ג כָּל אֵלּוּ הַדְּבָרִים, אֵינָם אֶלָּא כְּשֶׁרוֹאֶה אוֹתָם מִשְּׁלֹשִׁים לִשְׁלֹשִׁים יוֹם, וְאָז הֵם חוֹבָה כְּמוֹ בְּפַעַם רִאשׁוֹנָה.
3 All these things only apply if one hasn't seen them in 30 days; and in such a case, they constitute an obligation just like the first time.
ד הָרוֹאֶה מָקוֹם שֶׁנַּעֲשָׂה נֵס לְיָחִיד, אֵינוֹ מְבָרֵךְ; אֲבָל הוּא עַצְמוֹ מְבָרֵךְ שֶׁעָשָׂה לִי נֵס בַּמָּקוֹם הַזֶּה; וְכָל יוֹצְאֵי יְרֵכוֹ גַּם כֵּן מְבָרְכִין שֶׁעָשָׂה נֵס לְאָבִי בַּמָּקוֹם הַזֶּה.
4 One who sees a place where a miracle happened to a single person does not make a blessing; but if it was to himself, he blesses, "who made a miracle for me in this place." And all of his descendants also bless, "who made a miracle to my father in this place."...
ה מִי שֶׁנַּעֲשׂוּ לוֹ נִסִים הַרְבֵּה, בְּהַגִּיעוֹ לְאֶחָד מִכָּל הַמְּקוֹמוֹת שֶׁנַּעֲשָׂה לוֹ נֵס צָרִיךְ לְהַזְכִּיר כָּל שְׁאָר הַמְּקוֹמוֹת וְיִכְלֹל כֻּלָּם בִּבְרָכָה אַחַת.
5 Someone for whom many miracles were done, when he comes to one of the places that a miracle was done, he should mention all the places, and include them in one blessing.
ו עַל נֵס שֶׁל רַבּוֹ צָרִיךְ לְבָרֵךְ, כְּשֵׁם שֶׁהוּא מְבָרֵךְ עַל נֵס שֶׁל אָבִיו. הַגָּה: יֵשׁ אוֹמְרִים דְּהוּא הַדִּין אִם רוֹאֶה הָאָדָם שֶׁנַּעֲשָׂה לוֹ הַנֵּס מְבָרֵךְ עָלָיו, כְּמוֹ שֶׁמְּבָרֵךְ עַל הַמָּקוֹם שֶׁנַּעֲשָׂה בּוֹ הַנֵּס (אַבּוּדַרְהַם).
6 On a miracle done for one's teacher, he must bless as he would for his father's miracle. Rema: There are those who say that, similarly, if one sees the person for whom a miracle was performed, he should bless just as he would at the place where the miracle was performed.
ז עַל נֵס שֶׁל אָדָם מְסֻיָּם, כְּיוֹאָב בֶּן צְרוּיָה וַחֲבֵרָיו, וְכֵן עַל נֵס שֶׁל אָדָם שֶׁנִּתְקַדֵּשׁ בּוֹ שֵׁם שָׁמַיִם כְּגוֹן דָּנִיּאֵל וַחֲבֵרָיו, מְבָרֵךְ. לְפִיכָךְ הָרוֹאֶה גֹּב אֲרָיוֹת שֶׁל דָּנִיּאֵל, וְכִבְשַׁן הָאֵשׁ שֶׁל חֲנַנְיָה מִשָּׁאֵל וַעֲזַרְיָה, מְבָרֵךְ: שֶׁעָשָׂה נֵס לַצַּדִּיקִים בַּמָּקוֹם הַזֶּה.
7 On a miracle of a notable person, such as Yoav son of Tzeruya and his like, and on a miracle of a person by whom the Heavenly Name was sanctified, such as Daniel and his fellows, one makes a blessing. Therefore, one who sees the lions' den of Daniel, or the fiery furnace of Chananiah, Mishael and Azaryah, recites: "she'asah ness latzadikim bamakom hazeh" - "who wrought miracles for the righteous ones at this place."
ח הָרוֹאֶה אִשְׁתּוֹ שֶׁל לוֹט מְבָרֵךְ שְׁתַּיִם, עָלֶיהָ אוֹמֵר: בָּרוּךְ אַתָּה ה' אֱלֹהֵינוּ מֶלֶךְ הָעוֹלָם דַּיַּן הָאֱמֶת, וְעַל לוֹט אוֹמֵר: בָּרוּךְ אַתָּה ה' אֱלֹהֵינוּ מֶלֶךְ הָעוֹלָם זוֹכֵר הַצַּדִּיקִים.
8 One who witnesses Lot's wife pronounces two blessings: upon her, he says: "Blessed are you, oh G-d, King of the Universe, the True Judge", and upon Lot, he says "Blessed are you, oh G-d, King of the Universe, He who remembers the righteous".
ט יֵשׁ אוֹמְרִים שֶׁאֵינוֹ מְבָרֵךְ עַל נֵס אֶלָּא בְּנֵס שֶׁהוּא יוֹצֵא מִמִּנְהַג הָעוֹלָם; אֲבָל נֵס שֶׁהוּא מִנְהַג הָעוֹלָם וְתוֹלַדְתּוֹ, כְּגוֹן שֶׁבָּאוּ גַּנָּבִים בַּלַּיְלָה וּבָא לִידֵי סַכָּנָה וְנִצּוֹל וְכַיּוֹצֵא בָּזֶה, אֵינוֹ חַיָּב לְבָרֵךְ; וְיֵשׁ חוֹלֵק, וְטוֹב לְבָרֵךְ בְּלֹא הַזְכָּרַת שֵׁם וּמַלְכוּת.
9 There are those who say that one should only recite a blessing over such a miracle that defies the ways of the world. However, for the miracle that is within the ways of the world, e.g. dangerous robbers coming by night and no one being harmed, etc, one is not obligated to recite a blessing. But there is a difference of opinion regarding the above, so it is good, after all, to recite a blessing [for the natural miracle] but without saying G-d's name and the epithet of majesty, i.e. omitting the words "Lord, our G-d Majesty of the World..." in the blessing.