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

Automatic Conversion to Bicep

The converter automatically transforms your ARM template into Bicep format:

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
Expressions: ARM template functions convert to Bicep syntax
Outputs: ARM outputs become Bicep output declarations

Example: Converted Bicep Code

The same template in clean Bicep syntax:

targetScope = 'resourceGroup'

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

param location string = resourceGroup().location

var storageAccountType = 'Standard_LRS'

resource storageAccount 'Microsoft.Storage/storageAccounts@2021-04-01' = {
  name: storageAccountName
  location: location
  sku: {
    name: storageAccountType
  }
  kind: 'StorageV2'
  properties: {
    supportsHttpsTrafficOnly: true
  }
}

output storageAccountId string = storageAccount.id
Step 3

Review and Refine

Review the generated Bicep code and make necessary adjustments:

Symbolic names: Bicep uses readable names instead of ARM's string concatenation
Simplified syntax: Bicep removes ARM's bracket notation and verbose functions
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 officially recommends Bicep for new projects. Bicep offers simpler syntax (up to 50% less code), better tooling with IntelliSense, type safety, modularity, and easier maintenance. Bicep transpiles to ARM templates, so it's 100% compatible with existing Azure Resource Manager infrastructure.

Is Bicep compatible with all ARM template features?

Yes! Bicep is a transparent abstraction over ARM templates. Any resource that can be deployed with ARM can be deployed with Bicep. Bicep compiles down to standard ARM JSON templates, ensuring complete feature parity and compatibility with Azure Resource Manager.

What are the main syntax differences between ARM and Bicep?

Bicep removes ARM's bracket notation [...], uses symbolic names instead of resourceId() functions, has cleaner parameter decorators instead of metadata objects, and supports multi-line strings. The result is much more readable and maintainable infrastructure code.

Can I convert Bicep back to ARM templates?

Yes! Bicep is designed for bidirectional conversion. You can use az bicep build to generate ARM JSON from Bicep, or az bicep decompile to convert ARM to Bicep. We also offer a Bicep to ARM converter for reverse migration.

Do I need to change my deployment pipelines?

Minimal changes required. Azure CLI and PowerShell natively support Bicep deployment commands. GitHub Actions and Azure DevOps have built-in Bicep support. You can continue using the same deployment patterns, just reference .bicep files instead of .json files.

What tools are available for Bicep development?

Microsoft provides excellent tooling: VS Code extension with IntelliSense, syntax highlighting, and validation; Azure CLI integration; PowerShell module; and Bicep Playground for browser-based testing. The ecosystem is mature and well-supported with active development.