> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).
> Last updated: July 10, 2026

# Formatting

[BetaThis feature is new and we're actively working on it.](/accounts/settings/beta-experimental-features/#beta-features)

In the code editor of Design Studio, use the Formatting transformer to apply your choice of formatting to the source code.

Click *Transformers > Formatting* to get started.

## Format your source code

Click **Prettify** to make your code easy to read.

Clicking this unlocks further preferences you can enable:

*   Indent with spaces or tabs
*   Wrap HTML attributes

We remember the state of those toggles if you deactivate and later reactivate them.

To format the code in your editor, click **Format Document** at the top of the editor.

## Reduce the size of your email

Click **Minify** to reduce the size of your source code when it sends. You can see the size of your email before and after at the bottom of the editor.

Clicking this unlocks further preferences you can enable. We remember the state of those toggles if you deactivate and later reactivate them.

## Encode HTML entities

Special characters (like ©), reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces) can cause bugs that are hard to track down in emails.

To reduce these issues, turn on **Encode HTML entities**. We’ll automatically convert your charactres to HTML entities, which start with an ampersand (&) and end with a semicolon (;). For example, © becomes `&copy;`.

## Prevent widow words

This transformer prevents the last words of paragraphs from being on their own lines, which can make your email look cleaner.

*   *   [Format your source code](#format-your-source-code)
    *   [Reduce the size of your email](#reduce-the-size-of-your-email)
    *   [Encode HTML entities](#encode-html-entities)
    *   [Prevent widow words](#prevent-widow-words)

Copy page

Copy page [Download .md](/messaging/design-studio/emails/code-editor/transformers/formatting.md)

Is this page helpful?

![](https://docs.customer.io/images/export-success.png) ![](https://docs.customer.io/images/export-failure.png)

# How can we make it better?

Close

Do you need help from Customer.io support?  No  
 Yes

What part of Customer.io do you need help with? 

How can we improve this page?

Email (optional):  Please provide a valid email address

 I am not a bot

 

We appreciate your feedback!

Our support team will contact you as soon as possible
