Introduction. We studied the feasibility of using methylene blue (MB) as a marker to detect mucosal perforations during laparoscopic pyloromyotomy using in vitro and in vivo animal models. Materials and methods. MB was initially tested in pig stomachs in vitro. Information gathered from these experiments was then used to test the marker during experimental live piglet laparoscopic surgery. Results. MB stained the gastric mucosa blue; this tint could be seen through the intact mucosal layer exposed via myotomy. Dye extravasation was seen during laparoscopic surgery with mucosal perforations of 1.2 mm and greater with or without air insufflation of the stomach. Air extravasation was seen with perforations of 2.0 mm and greater. Conclusion. Full strength 1% MB dye instilled into the gastric lumen can potentially be used as a marker for detection of mucosal perforations of 1.2 mm or greater during laparoscopic pyloromyotomy.