Loading ARM to Bicep Converter...
Please wait a moment

How to Convert ARM Templates to Bicep - Step by Step Guide

Step 1

Input Your ARM Template

Start with your existing Azure Resource Manager template. Microsoft recommends Bicep as the modern alternative:

•
Paste directly: Copy your ARM template JSON and paste into the editor
•
Upload file: Click "Upload" to select your azuredeploy.json file
•
Try sample: Click "Sample" to see an example ARM template

Example: ARM Template JSON

A typical ARM template structure:

{
  "$schema": "https://schema.management.azure.com/...",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "storageAccountName": {
      "type": "string",
      "metadata": {
        "description": "Storage account name"
      }
    }
  },
  "resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "apiVersion": "2021-04-01",
      "name": "[parameters('storageAccountName')]",
      "location": "[resourceGroup().location]",
      "sku": {
        "name": "Standard_LRS"
      },
      "kind": "StorageV2"
    }
  ]
}
Step 2

Let It Convert

The Bicep version of your ARM template appears in the output panel as you type. If the JSON is broken, the error names the line and column. Here is what happens to each part:

•
Parameters: ARM parameters with metadata become Bicep params with decorators
•
Variables: ARM variables convert to Bicep var declarations
•
Resources: ARM resources become Bicep resource declarations with symbolic names. A condition becomes = if (...), nested child resources stay nested, and dependsOn entries point at resource symbols when they can be matched
•
Expressions: the brackets go, and parameters('x') / variables('x') become plain names. Other functions such as resourceId() or concat() are kept as written, since Bicep has them too
•
Outputs: ARM outputs become Bicep output declarations

Example: Converted Bicep Code

What the converter writes for the template above, in Bicep syntax (header comments left out):

targetScope = 'resourceGroup'

// Parameters
@description('Storage account name')
param storageAccountName string

// Resources
resource storageAccounts 'Microsoft.Storage/storageAccounts@2021-04-01' = {
  name: storageAccountName
  location: resourceGroup().location
  kind: 'StorageV2'
  sku: {
    name: 'Standard_LRS'
  }
}
Step 3

Review and Refine

Read the notes at the top of the output first: they list anything the converter left for you, such as copy loops, ARM's if() function or dependsOn entries it couldn't match. Then tidy up the rest:

•
Symbolic names: rename symbols like storageAccounts to something meaningful, and swap resourceId(...) calls for storageAccounts.id
•
Simplified syntax: concat() still works, but string interpolation like 'st${suffix}' reads better
•
Type safety: Bicep provides better IntelliSense and validation
•
Modularity: Consider breaking large templates into Bicep modules
Step 4

Deploy Your Bicep Template

Save and deploy your Bicep template using Azure CLI or PowerShell:

•
Download file: Click "Download" to save as main.bicep
•
Validate: Run az deployment group validate
•
Preview changes: Use az deployment group what-if
•
Deploy: Run az deployment group create --template-file main.bicep

Frequently Asked Questions

Why should I migrate from ARM to Bicep?

Microsoft recommends Bicep for new Azure infrastructure code. The same deployment usually takes far fewer lines, you get IntelliSense and type checks in VS Code, and modules make large templates easier to split up. Bicep compiles to ordinary ARM JSON, so Azure Resource Manager deploys it exactly as it deploys your current templates.

What does this converter change, and what does it leave for me?

It turns parameters, variables, resources and outputs into Bicep declarations, rewrites parameters('x') and variables('x') as plain names, turns a resource condition into = if (...), keeps nested child resources nested, and replaces dependsOn entries with resource symbols when it can match them to a resource in the same template. Strings are escaped, so quotes, backslashes and a literal ${ come through unchanged, and numbers keep every digit (decimals become json('14.50'), because Bicep has no decimal type). Copy loops, ARM's if() function, scope and user-defined functions are not rewritten: the output lists them as notes at the top so you know where to look. For a full decompile with the official tooling, run az bicep decompile.

Is my template uploaded anywhere?

No. The conversion runs in your browser; the template you paste or upload is not sent to our server.

Is Bicep compatible with all ARM template features?

Anything you can deploy with an ARM template you can deploy with Bicep, because Bicep compiles down to a standard ARM JSON template. New resource types and API versions work in Bicep the day they work in ARM.

What are the main syntax differences between ARM and Bicep?

Bicep drops ARM's [...] expression brackets, lets you refer to a resource by its symbolic name instead of building resourceId() strings, uses decorators such as @description() instead of metadata objects, and works out most dependencies on its own, so long dependsOn lists mostly disappear.

Can I convert Bicep back to ARM templates?

Yes. az bicep build turns a .bicep file into ARM JSON, and az bicep decompile goes the other way. There is also a Bicep to ARM converter on this site.

Do I need to change my deployment pipelines?

Usually very little. Azure CLI and Azure PowerShell deploy .bicep files with the same commands you use for JSON templates, and GitHub Actions and Azure DevOps support Bicep out of the box. In most pipelines you only point the template path at the .bicep file.

What tools are available for Bicep development?

The Bicep extension for VS Code gives you IntelliSense, validation and a visualizer. The Azure CLI and Azure PowerShell can build, decompile and deploy Bicep files, and the Bicep Playground lets you try snippets in the browser.