In this short article I will explain how to add multiple line breaks (<BR />) to JavaScript Alert message box.
If you want to add a new line to the text displayed inside the JavaScript alert you will need to make use of the following new line character.
Here’s a simple example where I am illustrating how to display multiple lines in a JavaScript Alert message box.
<html xmlns="">
    <script type = "text/javascript">
        function DisplayMultiLineAlert() {
            var newLine = "\r\n"
            var message = "ASPSnippets offers free ASP.Net"
            message += newLine;
            message += "Code Snippets, Tutorials, Articles,";
            message += newLine;
            message += "Technical Stuff, Tips, Solutions";
            message += newLine;
            message += "and much more.";
    <input type = "button" value = "Show Message" onclick = "DisplayMultiLineAlert()" />
Multiline Alert: Display multiple lines in JavaScript Alert