To find the scale factor needed to dilate a square from a side length of 6 units to a side length of 18 units, you can use the following formula:
\[ \text{Scale Factor} = \frac{\text{New side length}}{\text{Original side length}} \]
Substituting in the values:
\[ \text{Scale Factor} = \frac{18}{6} = 3 \]
Therefore, the scale factor you should use is 3.