Whatever message this page gives is out now! Go check it out!

Special characters

Last update:
May 18, 2026
The double-quotation marks ("), single-quotation mark ('), and number sign (#) characters have special meaning to ColdFusion. To include any of them in a string, double the character; for example, use ## to represent a single # character. 
The need to escape the single- and double-quotation marks is context sensitive. Inside a double-quoted string, you do not need to escape single-quotation mark (apostrophe) characters.
Inside a single-quoted string, you do not escape double-quotation mark characters. The following example illustrates escaping special characters, including the use of mixed single- and double-quotation marks:
<cfset mystring = "We all said ""Happy birthday to you."""> 
<cfset mystring2 = 'Then we said "How old are you now?"'> 
<cfoutput> 
#mystring#<br> 
#mystring2#<br> 
Here is a number sign: ## 
</cfoutput>
The output looks as follows:
We all said "Happy birthday to you." 
Then we said "How old are you now?" 
Here is a number sign: #

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page