JQuery sortable lists also supports export methods. Look at the console log to see the result of buttons below. To array To hierarchy To string html pattern Note that li items can contains only one or max two direct children. Content div as a wrapper of li content and another list if item contains nested list. Like this: <ul> <li> <div>Whatever you want here</div> <ul> <li><div>Nested list item</d