#Java 8, 31 bytes <!-- language-all: lang-java --> s->s.replaceAll("(?s).","$0$0") [Try it online.](https://tio.run/##jU9NTwIxEL3zK8aGhDZIw1mihsSLB/Hg0fVQS9WyZdrszEKM4bev3bV4UYyXaafvq29jdma2WdedDYYI7ozHjxGAR3bNi7EOVv0K8MCNx1ewslxILfL7YZQHsWFvYQUIl9DR7Ip041LI4mUIUshrUlqci/F8PBeqW/SS1D6HLCnKXfRr2ObkYv74BEZ9xbIjluImZr4DSs7UZ2JIPkIVVrgMFCvcx6amfHh@qxDdPnh01MPix1eHwEH/3aa0fCd2Wx1b1ikDHFCKW0wtX8Ax9hfKREymNM3zNEXct/wfG9RWkvrbq9Q5dJ8) **Explanation:** s-> // Method with String as both parameter and return-type s.replaceAll("(?s).","$0$0") // Regex-replace all matches with the replacement // And return the changed String as result *Regex explanation:* (?s). // Match: (?s) // Enable DOTALL mode so newlines are treated as literal . // A single character $0$0 // Replacement: $0 // All characters found in the match $0 // And again all characters found in the match