Runtime verified Test scripts included

Syntax

Concat(string1, string2[, stringN, ...])  →  string

Parameters

Name Type Required Description
string1 string | number | date | boolean Yes First value to join
string2 string | number | date | boolean Yes Second value to join
stringN string | number | date | boolean No Any number of further values

At least two values are needed. There is no upper bound on the argument count.

Example

%%=Concat("Hello", "World")=%%

Renders HelloWorld.

Nothing is inserted between the values, so a separator is an argument of its own:

%%=Concat("a", "-", "b")=%%

Renders a-b.

Return value

string — every value turned into text and joined in order, with no separator.

The result is arbitrary text, so there is no fixed set of special values to test for.

Behaviour

Two arguments is the minimum. An email that calls Concat("only") or Concat() cannot be saved: the content API answers HTTP 400 with “The AMPscript syntax isn’t valid”, pointing at the call. Pass a second value, even an empty string, when you only have one.

Variadic. Two, three, twelve and twenty arguments all join in order: Concat("a", "b", "c") gives abc, and a twenty-argument call gives abcdefghijklmnopqrst.

Numbers join as written. Concat(12, 3.5) gives 123.5. No arithmetic happens.

Booleans join as text. Concat(true, false) gives truefalse.

Dates are written in ISO form. Concat(Now(), "X") gives a value like 2026-11-22T23:21:17X: date and time joined by a T, no time zone suffix.

Empty strings add nothing. Concat("", "") gives an empty string, not an error.

Show Next test script
<!-- Marketing Cloud Next test script for Concat. Paste it into the HTML component of a
     Next email and open the preview. Each line prints the result Next gave when the call
     was rendered on its own (expect) next to the result of this run (got).
     Assembled from single-call test emails (dates on the page); it has not been
     run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[abc] got=[%%=Concat("a","b","c")=%%]</p>
<p>c2 expect=[HelloWorld] got=[%%=Concat("Hello","World")=%%]</p>
<p>c3 expect=[123.5] got=[%%=Concat(12, 3.5)=%%]</p>
<p>c4 expect=[truefalse] got=[%%=Concat(true, false)=%%]</p>
<p>c5 expect=[a-b] got=[%%=Concat("a", "-", "b")=%%]</p>
<p>c6 expect=[123456789ABC] got=[%%=Concat("1","2","3","4","5","6","7","8","9","A","B","C")=%%]</p>
<p>c7 expect=[abcdefghijklmnopqrst] got=[%%=Concat("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t")=%%]</p>
<p>c8 expect=[2026-11-22T23:21:17X] got=[%%=Concat(Now(), "X")=%%]</p>
<p>c9 expect=[] got=[%%=Concat("", "")=%%]</p>

Show calls that fail in Next (one email each)
<!-- Run each call below in its own Next email: one of them in a combined email
     would stop the whole preview or block the save. -->

<!-- email 1: expect that the save is rejected (HTTP 400) -->
%%=Concat("only")=%%

<!-- email 2: expect that the save is rejected (HTTP 400) -->
%%=Concat()=%%

Availability & differences

PlatformAvailable
Marketing Cloud EngagementYes
Marketing Cloud NextYes, from API 67.0

See also