On this page
  1. Step 1 — Create the free account
  2. Step 2 — Set cost guardrails before you build
  3. Step 3 — Deploy the static frontend on Static Web Apps
  4. Step 4 — Deploy the API with Azure Functions
  5. Step 5 — Add a database with Cosmos DB
  6. Step 6 — (Optional) Run a VM instead of serverless
  7. Step 7 — Convert to pay-as-you-go within 30 days
  8. Step 8 — Track free usage monthly
  9. Where AI coding assistants get this wrong
  10. Checklist
  11. FAQ
    1. Does Azure require a credit card?
    2. What happens if I don’t convert to pay-as-you-go within 30 days?
    3. Which Azure VM is free?
    4. Is Azure Functions free forever?
    5. What’s the difference between the $200 credit and the free services?
  12. Related topics
  13. Sources
tutorial

How to Deploy Your First App on Azure for Free

Deploy a web app on Azure for $0: the free account's $200 credit, Azure Functions, Static Web Apps, Cosmos DB, and always-free limits that keep it free.

Quick answer

  • A new Azure free account gets a $200 credit for 30 days, 12 months of free amounts for ~20 popular services, and 65+ always-free services.
  • The free stack is Static Web Apps (frontend) + Azure Functions (API) + Cosmos DB (database) — all always free within monthly limits.
  • Create resources from the Free services page so free tiers auto-select; elsewhere you’ll get billed SKUs.
  • Convert to pay-as-you-go within 30 days or the free account gets disabled.

Step 1 — Create the free account

Go to azure.microsoft.com/free and sign up with a Microsoft or GitHub account. Azure needs a phone number and a credit or debit card for identity verification (a temporary ~$1 hold, not a charge), and you receive $200 in credit usable for 30 days on any service.

How to verify it worked: in the portal under Cost Management, your subscription shows the $200 credit balance and its 30-day expiry.

Step 2 — Set cost guardrails before you build

In the portal, open Cost ManagementBudgetsAdd, set a monthly budget of $10-20, and add an email alert at 50%, 80%, and 100%. The free account also has spending protection — it cannot charge you while you’re on it — but budgets are what tell you a free allowance is about to run out.

How to verify it worked: the budget appears in the list with an Active status.

Step 3 — Deploy the static frontend on Static Web Apps

Static Web Apps is the always-free static host: 100 GB of bandwidth per subscription, 2 custom domains, and 0.5 GB of storage per app. In the portal, go to Free servicesStatic Web AppsCreate, and either connect a GitHub repo (it deploys on push) or upload your index.html and assets manually.

How to verify it worked: the service generates a *.azurestaticapps.net URL that serves your site over HTTPS.

Step 4 — Deploy the API with Azure Functions

Functions gives you 1 million requests per month, always free. In the portal’s Free services page, create a Function App (Consumption plan), add an HTTP trigger function, and test it:

curl "https://YOUR-FUNC.azurewebsites.net/api/hello?name=Ada"

How to verify it worked: the response is a 200 with your function’s JSON payload, and the Monitor tab in the portal shows the invocation. Store API keys as function app settings (environment variables), never in code.

Step 5 — Add a database with Cosmos DB

Cosmos DB’s always-free tier covers 1,000 request units per second and 25 GB of storage. In the portal’s Free services page, create a Cosmos DB account with the free tier enabled, create a database and container, and connect it from your Functions app using the connection string from Keys.

How to verify it worked: an item written by your API appears in the Data Explorer tab. If you need SQL rather than NoSQL, Azure SQL Database’s serverless tier is also always free at 100,000 vCore-seconds + 32 GB per month — but pick one, not both.

Step 6 — (Optional) Run a VM instead of serverless

If your app needs a long-running process, the free VM is the B1s burstable instance (plus B2pts v2 Arm and B2ats v2 AMD): 750 hours per month each, for 12 months. Create it from the Free services page — creating a VM outside that flow defaults to a paid D-series SKU. An always-on B1s uses 720 of its 750 free hours per month, so it fits.

How to verify it worked: the VM shows in Virtual machines with a running state, and Cost Management reports $0 for it.

Step 7 — Convert to pay-as-you-go within 30 days

The $200 credit is only valid for 30 days, and if you stay on the free account after it’s used, your services get disabled. Convert to pay-as-you-go before day 30 (in the portal, from the subscription blade): you keep the remaining credit until the 30 days are up, keep the 12-month and always-free services, and are billed only for usage beyond the free monthly amounts.

How to verify it worked: the subscription shows pay-as-you-go pricing, and Cost Management still lists your remaining credit and the free-service usage breakdown.

Step 8 — Track free usage monthly

Cost Management → the free-services usage report shows each service’s consumption against its monthly allowance.

How to verify it worked: every service is under its allowance and the projected cost is $0.

Where this bites vibecoders

Azure punishes inattention harder than the other two clouds: the $200 credit dies at 30 days, the free account disables your services if you don’t convert, and resources created outside the Free services page silently use paid SKUs. An AI-generated ARM template will happily provision a General Purpose SQL database, a standard App Service plan, or a D-series VM — all billed, none flagged. The whole game is creating resources through the Free services flow, converting to pay-as-you-go on time, and checking the usage report monthly.

Where AI coding assistants get this wrong

  • Generating paid SKUs: General Purpose Azure SQL, standard App Service plans, D-series VMs instead of B1s.
  • Creating resources outside the Free services page, so free tiers never auto-select.
  • Hardcoding connection strings in function code instead of app settings.
  • Omitting budget alerts from generated Bicep/ARM templates.
  • Not mentioning that the $200 credit expires at 30 days and the account disables without conversion.

Checklist

  • Create the free account and note the $200 credit + 30-day clock
  • Set a Cost Management budget alert ($10-20) before creating resources
  • Deploy the frontend on Static Web Apps (always free)
  • Deploy the API on Azure Functions with secrets in app settings
  • Use Cosmos DB (1,000 RU/s + 25 GB always free) or Azure SQL serverless
  • Create every resource from the Free services page so free tiers auto-select
  • Convert to pay-as-you-go within 30 days to keep free services
  • Check the free-services usage report monthly

FAQ

Does Azure require a credit card?

Yes, for identity verification — Azure places a temporary hold of about $1, not a charge. The free account won’t bill you unless you move to pay-as-you-go pricing, which you must do within 30 days to keep the free services.

What happens if I don’t convert to pay-as-you-go within 30 days?

Your free account and its services are disabled once the $200 credit is used up. Convert to pay-as-you-go to keep the 12-month and always-free services; you’re only billed for usage beyond the free monthly amounts.

Which Azure VM is free?

B1s, B2pts v2 (Arm-based), and B2ats v2 (AMD-based) burstable VMs are free for 750 hours each per month, for the first 12 months. Create them from the Free services page so the free tier is selected automatically.

Is Azure Functions free forever?

One million requests per month is always free, but compute time beyond the free allowance (400,000 GB-seconds per month) bills at standard rates. A low-traffic API stays at $0; a high-traffic one does not.

What’s the difference between the $200 credit and the free services?

The $200 credit is a 30-day allowance you can spend on anything, including paid tiers. The free services are monthly usage allowances — some for 12 months, some always free — that cost $0 as long as you stay within their limits. Use the free services first and save the credit for things with no free tier.

Sources

Share: