---
schema_version: "1"
id: e02f5b0a173de2ea25f38e92170bfcc880ae450beb77e1291ec4e699107a74a0
title: Transform Message Component
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mule-runtime/latest/transform-component-about.md
canonical_url: https://docs.mulesoft.com/mule-runtime/latest/transform-component-about
source_site: docs.mulesoft.com
content_type: documentation
content_hash: c8a68c282b5d0cbed260887cd9ec835dedf4bb088e2ac27d4a9bc082e6c78dc1
description: MuleSoft Documentation Site
release: "4.13"
latest: true
---
---
product: Mule Runtime
version: 4.13
is-latest-version: true
---

# Transform Message Component

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

The Transform (or Transform Message) component converts input data to a new output structure or
format. You can use the component’s visual mapper to build your transformation implicitly by
dragging and dropping elements of the incoming data structure, or you can explicitly write a
transformation script in DataWeave expression language.

- Graphical View (Drag-and-Drop editor): Two tree views show the expected metadata structures of the
  input and output. Mappings between these two trees are represented by lines that connect input to
  output fields. The lines can be created by dragging and dropping an element from the input to
  another element to the output.

  ![Input and output structures for a transformation message component](/mulesoft/current/en-us/mule-runtime/latest/_images/transform-message-component-concept-design-center-b3dc0.png)

  Figure 1. Drag-and-Drop Editor in the Transform Component

- Script View: The visual mapping can be represented as DataWeave code. Advanced transformations
  such as aggregation, normalization, grouping, joining, partitioning, pivoting and filtering can be
  coded here.

  ![A DataWeave script outputting JSON including version number, store ID, and item ID](/mulesoft/current/en-us/mule-runtime/latest/_images/transform-message-component-concept-design-center-d3719.png)

  Figure 2. DataWeave Script in the Transform Component

Note that changes in one view are reflected in real time with the other.

## Preview

A preview of your output is built on sample data (such as a JSON snippet) and is updated in real
time as you make changes to your transformation.

![A DataWeave transformation from XML to JSON](/mulesoft/current/en-us/mule-runtime/latest/_images/using-dataweave-in-studio-b504a.png)

Figure 3. Transform Component in Anypoint Studio

## Metadata

The Transform component accepts input and output metadata for the message payload, a variable or an
attribute. You can provide format-specific resources and settings for
[supported mime types (formats)](https://docs.mulesoft.com/dataweave/latest/dataweave-formats):

- CSV example or RAML definition

- Copybook file or schema

- Excel column name and type definitions (including String, Number, Boolean, Date, and DateTime) for
  one more sheets

- Fixed Width column name, type (String, Integer, Decimal, Boolean, Date, and DateTime), width, and
  format settings

- Flat File schema

- JSON example or schema

- Object class or RAML definition

- Simple Type (String, Number, Integer, Boolean, Date, or DateTime)

- XML example or schema

## See Also

[Workflow: Create a Mapping](https://docs.mulesoft.com/mule-runtime/latest/transform-workflow-create-mapping-ui-studio)

[Tips: Transform Message UI](https://docs.mulesoft.com/mule-runtime/latest/transform-tips-transform-message-ui-studio)

[DataWeave Language](https://docs.mulesoft.com/mule-runtime/latest/dataweave)
