creates a string by concatenating all the si, with spaces inserted between them.


creates a string by concatenating the sij, and inserting spaces at the lowest level and newlines at the higher level.


inserts the separator sep between all elements in list.


use left and right as delimiters after concatenation.


inserts separator sepi between elements of list at level i.


  • Any element of list that is not a string is converted to a string using TextString.
  • In StringRiffle[list], spaces are used as separators at the lowest level. At the next level up, newlines are used. At each higher level, successively more newlines are used.


open allclose all

Basic Examples  (2)

Insert spaces between successive elements:

Insert a specific string between elements:

Specify delimiters to use at the beginning and end of the result:

Using newlines and spaces as separators:

Specify separators at each level:

Generalizations & Extensions  (1)

By default, higher-dimensional arrays use increasing numbers of newlines to separate levels:

Applications  (3)

Convert the contents of a matrix to a string:

Convert a table to a string in a TSV (tab-separated values) format:

Rewrite a list of key-value pairs into a JSON-like string:

Properties & Relations  (1)

Values that are not strings are converted to strings using TextString:

Wolfram Research (2015), StringRiffle, Wolfram Language function,


Wolfram Research (2015), StringRiffle, Wolfram Language function,


Wolfram Language. 2015. "StringRiffle." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2015). StringRiffle. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_stringriffle, author="Wolfram Research", title="{StringRiffle}", year="2015", howpublished="\url{}", note=[Accessed: 17-June-2024 ]}


@online{reference.wolfram_2024_stringriffle, organization={Wolfram Research}, title={StringRiffle}, year={2015}, url={}, note=[Accessed: 17-June-2024 ]}