Blog
Wild & Free Tools

JSON to XML for Postman, Power Automate, and Logic Apps

Last updated: March 2026 7 min read
Quick Answer

Table of Contents

  1. Prototyping before you wire the step
  2. Azure Logic Apps — the xml() function
  3. Power Automate — XML action and compose
  4. Postman — raw XML body from JSON
  5. Common gotchas in all three platforms
  6. Frequently Asked Questions

Azure Logic Apps, Power Automate, and Postman all expose ways to convert JSON to XML, but wiring them takes steps — create a Compose action, pick the right expression, debug the output. A browser converter lets you preview the exact XML shape before you build the step, so you know what expression to use and what the result will look like. This guide covers the prototyping workflow for all three platforms.

Prototyping Before You Wire the Step

Every integration platform that has a JSON-to-XML action also makes you pay for iteration: create the step, run the flow, inspect the output, adjust, rerun. Each cycle is seconds to minutes depending on cold-start time.

A browser converter cuts the design-time loop to zero. Paste sample JSON, see the exact XML, set your root element name, adjust, see again. Once you know the shape, wire the real step in the platform with confidence.

Open the converter in a second tab while you're building the flow.

Azure Logic Apps — the xml() Function

In Logic Apps, the xml() expression converts a JSON object to an XML string. Syntax:

xml(json('{"customer":{"id":"C-123","name":"Ana"}}'))

The function expects a JSON string wrapped in json(). The output is XML where every key becomes an element. Attributes are expressed as @-prefixed keys in the input.

Use the browser converter to verify the JSON shape before writing the expression. If your JSON has keys with spaces, the browser tool sanitizes them with underscores — Logic Apps' xml() will throw an error instead. Fix the keys before you wire the action.

Sell Custom Apparel — We Handle Printing & Free Shipping

Power Automate — XML Action and Compose

Power Automate has a "Compose" action that accepts the same xml() expression as Logic Apps (they share the expression engine). It also has a "Parse XML" action for the reverse direction.

For prototyping: paste your source JSON into the browser converter, set the root to match your operation name, copy the output into a Compose step's default value. Run the flow once to verify the rest of the pipeline works. Then replace the default with a dynamic xml() expression bound to the real input.

This approach saves 3-5 trigger runs during development — and trigger runs count against your daily quota on consumption plans.

Postman — Raw XML Body From JSON

Postman doesn't have a built-in JSON-to-XML action. You convert manually and paste the result into the request body. Workflow:

  1. Grab the JSON payload your REST service already sends.
  2. Paste it into the browser converter, set the root to the SOAP operation name.
  3. Copy the output.
  4. In Postman, set the body type to raw XML, paste the output, wrap it in a SOAP envelope if needed.
  5. Set the Content-Type header to text/xml; charset=utf-8 for SOAP 1.1 or application/soap+xml for SOAP 1.2.

Save as a Postman collection example. Every future test uses the same shape without re-converting.

Common Gotchas in All Three Platforms

Three things routinely break integration flows:

Knowing the shape up front removes the debug cycle from your build.

Prototype Your XML Body Before You Wire the Flow

Preview the exact JSON-to-XML shape, then build the Logic App or Postman request with confidence.

Open Free JSON to XML Converter

Frequently Asked Questions

Does Logic Apps' xml() function produce the same output as this browser tool?

Almost — both map keys to elements and arrays to repeated siblings. The main difference: Logic Apps reads @-prefixed keys as attributes, while this tool ignores prefixes and outputs element-only. Preview with the browser tool to see the elements, then decide whether to add @ prefixes for Logic Apps.

Can I use this browser tool inside a running Power Automate flow?

No — it's a design-time prototype. For runtime conversion inside the flow, use Compose with xml(json(triggerBody())). The browser tool is for seeing the shape before you wire it.

Why does my Postman request fail with "malformed XML" after conversion?

Usually one of three things: SOAP envelope missing, wrong Content-Type header, or a namespace mismatch. The conversion itself produces well-formed XML — the SOAP-specific wrapping is separate. See our SOAP XML guide for the envelope template.

Is there a way to share conversion presets across my team?

The browser tool doesn't save presets. For team-shared conversion logic, put the JSON-to-XML rules in your platform (Logic Apps template, Power Automate solution, or Postman collection). The browser is for individual preview work.

Carlos Mendez
Carlos Mendez Photo Editing & Image Writer

Carlos has been a freelance photographer and photo editor for a decade, working with clients from local businesses to regional magazines.

More articles by Carlos →
Launch Your Own Clothing Brand — No Inventory, No Risk