Skip to content
Format your HTML, XML, CSS, JavaScript, PHP and JSON code in a few easy steps
Format your HTML, XML, CSS, JavaScript, PHP and JSON code in a few easy steps

TopFormats.com

  • Html Formatter
  • Json formatter
  • Js Beautifier
  • Css beautifier
  • Xml formatter
  • PHP formatter
  • FAQ Topformats
Format your HTML, XML, CSS, JavaScript, PHP and JSON code in a few easy steps

TopFormats.com

String Builder

How to build string variable from plain text

  • Step 1: Go to link: String builder
  • Step 2: Enter the text in Input textarea.
  • Step 3: Click [Build] button.

Uses String Builder

  • Convert text to multiline string for programming languages like javascript.
  • Concatenate HTML, JS, JAVASCRIPT, C#, JAVA, PHP.
  • Json multiline strings.
  • Function Sample or Reset Input and Output.

Example String Builder

Input:

{"menu": {
     "id": "file",
     "value": "File",
     "popup": {
          "menuitem": [
             {"value": "New", "onclick": "CreateNewDoc()"},
             {"value": "Open", "onclick": "OpenDoc()"},
             {"value": "Close", "onclick": "CloseDoc()"}
           ]
     }
}} 

String converted would be:

' {"menu": { ' +
' "id": "file", ' +
' "value": "File", ' +
' "popup": { ' +
' "menuitem": [ ' +
' {"value": "New", "onclick": "CreateNewDoc()"}, ' +
' {"value": "Open", "onclick": "OpenDoc()"}, ' +
' {"value": "Close", "onclick": "CloseDoc()"} ' +
' ] ' +
' } ' +
' }} ' +
' ' ;

©2025 Format your HTML, XML, CSS, JavaScript, PHP and JSON code in a few easy steps | WordPress Theme by SuperbThemes