Skip to main content

SIMS Azure Convert Functions - Universal API for Data Conversion

Open Source (MIT)
SIMS Azure Convert Functions - Universal API for Data Conversion

Open-source serverless data format converter built on Azure Functions. REST API for converting CSV to JSON, JSON to CSV, Markdown to HTML, HTML to PDF, URL to PDF, URL to screenshot (JPG), and DBF to JSON. Instant conversion without infrastructure setup — pay only for usage. Supports legacy dBase/FoxPro files, Cyrillic/Unicode characters, web page rendering with Playwright. Python 3.11, auto-scaling from 0 to millions of requests. Free tier: 1M requests/month. Alternative to building custom file conversion microservices.

Data Conversion: The Infrastructure Problem

Modern applications need to work with data in multiple formats—CSV from legacy systems, JSON for APIs, PDF for documents, HTML for web content. Building conversion services requires infrastructure setup, server management, scaling concerns, and ongoing maintenance. For many organizations, this overhead outweighs the actual conversion needs.

The Challenge

Organizations need to convert data between formats (CSV, JSON, Markdown, HTML, PDF, DBF) but don't want to manage servers, infrastructure, or scaling concerns. They need instant conversion capabilities without the operational overhead.

The Solution: Serverless Conversion API

SIMS Azure Convert Functions is a set of ready-to-use serverless services for converting between various data formats. Built on Azure Functions, it provides instant data conversion via REST API—no servers, no infrastructure setup, just send an HTTP request and get the result in the format you need.

How It Works

Each conversion function is an independent serverless microservice that:

  1. Receives Request: Accepts data via HTTP POST with the source format
  2. Processes Data: Converts data using optimized algorithms
  3. Returns Result: Delivers converted data in the target format
  4. Scales Automatically: Azure Functions handles scaling from 0 to millions of requests

All functions run on-demand, scale automatically, and you pay only for actual usage.

Key Capabilities

📊 Data Conversion

🔄

CSV ↔ JSON

Fast conversion of tabular data with Unicode and special character support. Automatic structure detection handles various CSV formats.

📝

Markdown → HTML

Full-featured HTML documents with CSS. Support for tables, code blocks, lists. Optional content sanitization for security.

🗄️

DBF → JSON

Conversion of legacy dBase files. Support for dBASE III, dBASE IV, FoxPro. Automatic encoding handling for international characters.

📄 Document Generation

📄

Professional Document Generation

HTML → PDF

Professional PDF documents with Unicode and Cyrillic support. Customizable styles and fonts.

URL → PDF

Convert web pages to PDF with JavaScript content rendering. Automatic image loading and dynamic table support.

URL → JPG

Web page screenshots with customizable resolution. Full-page captures for documentation.

⚡ Performance & Reliability

  • 🚀
    Instant Startup

    No cold start thanks to intelligent caching and Azure Functions optimization

  • 📊
    Parallel Processing

    Automatic scaling with Azure Functions—from 0 to millions of requests

  • Optimized Algorithms

    Fast processing of large data volumes—up to 10,000 rows/sec for CSV conversion

  • 99.95% SLA

    Azure Functions availability guarantee with automatic updates and monitoring

🔐 Security Features

🛡️

Enterprise-Grade Security

  • Input Validation: Protection against incorrect requests and malformed data
  • SSRF Protection: Blocking access to internal resources and private networks
  • Size Limits: Protection against DoS attacks with configurable request size limits
  • Authorization: Azure Function Keys support for API access control

💰 Cost-Effectiveness

💵

Pay-Per-Use

Pay only for actual usage—no idle server costs

☁️

No Infrastructure

Azure manages everything—servers, scaling, updates

📈

Free Tier

1M free requests/month, 400K GB-seconds execution

💼 Use Cases

👨‍💻 For Developers

Integrate conversion into your applications via REST API. Simple HTTP requests without infrastructure deployment. Perfect for microservices and serverless architectures.

📊 For Business Analysts

Quick processing of data from various sources. Convert reports to required formats. Automate routine conversion tasks without IT involvement.

⚙️ For DevOps Engineers

Serverless architecture—pay only for usage. Automatic scaling from 0 to millions of requests. Minimal maintenance costs and operational overhead.

🏢 For Enterprises

Processing legacy formats (DBF). Data migration between systems. Document generation from web content. Enterprise-grade security and reliability.

🛠️ Technical Stack

Core Technologies

  • 🐍 Python 3.11 — modern and performant runtime
  • ☁️ Azure Functions — Microsoft's serverless platform
  • 🎭 Playwright — JavaScript content rendering
  • 📄 xhtml2pdf — PDF generation from HTML
  • 🐼 pandas — tabular data processing

Architecture

  • 🔀 Serverless microservices architecture
  • Runs on demand, scales automatically
  • 🔒 Isolated functions for security
  • 📊 Structured logging and monitoring

📋 API Endpoints

Endpoint Method Description Input Output
/api/csv2json POST CSV → JSON CSV string JSON array
/api/json2csv POST JSON → CSV JSON object/array CSV string
/api/md2html POST Markdown → HTML Markdown string HTML document
/api/html2pdf POST HTML → PDF HTML string PDF file
/api/url2pdf POST URL → PDF URL string PDF file
/api/url2jpg POST URL → JPG URL string JPEG image
/api/dbf2json POST DBF → JSON DBF file (binary) JSON array

All endpoints support optional code parameter for authorization via Azure Function Keys.

📈 Example Usage

Converting CSV to JSON

curl -X POST "https://func-app.azurewebsites.net/api/csv2json" \
-H "Content-Type: text/csv" \
-d "name,age,city
John,25,New York
Jane,30,London"

Result: JSON array with converted data

Generating PDF from Web Page

curl -X POST "https://func-app.azurewebsites.net/api/url2pdf" \
-H "Content-Type: text/plain" \
-d "https://example.com/report"

Result: PDF file with full page content

Web Page Screenshot

curl -X POST "https://func-app.azurewebsites.net/api/url2jpg?width=1920&height=1080" \
-H "Content-Type: text/plain" \
-d "https://example.com/dashboard"

Result: JPEG image with specified resolution

Python Integration

import requests

response = requests.post( 'https://func-app.azurewebsites.net/api/csv2json', data='name,age\nJohn,25', headers={'Content-Type': 'text/csv'} ) json_data = response.json()

Simple HTTP integration for any language

📊 Performance Metrics

  • CSV ↔ JSON: up to 10,000 rows/sec
  • 📄
    HTML → PDF: ~2-5 seconds per document
  • 🌐
    URL → PDF: ~5-10 seconds (depends on page complexity)
  • 📸
    URL → JPG: ~3-7 seconds

* Results may vary depending on data size and content complexity

🚀 Quick Start

Deploy to Azure

# Create Function App
az functionapp create \
--resource-group rg-convert-functions \
--consumption-plan-location eastus \
--runtime python \
--runtime-version 3.11 \
--functions-version 4 \
--name func-convert-app \
--storage-account stconvertfuncs \
--os-type Linux

Deploy functions

func azure functionapp publish func-convert-app

🔧 Configuration

All parameters are configured via environment variables:

  • MAX_REQUEST_SIZE — maximum request size (default: 10 MB)
  • PLAYWRIGHT_TIMEOUT — rendering timeout (default: 30 sec)
  • CACHE_TTL — cache lifetime (default: 1 hour)
  • DEFAULT_SCREENSHOT_WIDTH/HEIGHT — screenshot dimensions

💡 Why This Matters

For organizations that need data conversion capabilities, SIMS Azure Convert Functions eliminates infrastructure overhead while providing enterprise-grade conversion services. It's not just about converting formats—it's about:

  • Zero Infrastructure: No servers to manage, no scaling concerns, no maintenance overhead
  • Instant Deployment: Deploy in 5 minutes, start converting immediately
  • Cost Efficiency: Pay only for usage—perfect for sporadic or variable workloads
  • Enterprise Security: Built-in protection against common attacks and vulnerabilities
  • Standards Compliance: REST API with JSON responses, Swagger documentation, code examples

If you need to convert data between formats without managing infrastructure, this serverless solution provides production-ready capabilities with minimal operational overhead.

❓ Frequently Asked Questions

How to convert CSV to JSON using a REST API?
Send a POST request to the /api/csv2json endpoint with your CSV data as the request body and Content-Type: text/csv header. The function returns a JSON array with each row as an object. Supports Unicode, special characters, and various CSV delimiters. Processing speed: up to 10,000 rows per second.

How to generate PDF from HTML or a web page URL programmatically?
Use the /api/html2pdf endpoint for HTML string input or /api/url2pdf for a web page URL. The URL-to-PDF function uses Playwright to render JavaScript content, load images, and handle dynamic tables before converting to PDF. Supports Cyrillic and Unicode characters with customizable styles and fonts.

How to convert DBF (dBase/FoxPro) files to JSON?
Upload your DBF file as a binary POST request to /api/dbf2json. The function supports dBASE III, dBASE IV, and FoxPro formats with automatic encoding detection for international characters. Returns a JSON array of records — perfect for migrating data from legacy systems.

How to take a screenshot of a web page using an API?
Send a POST request to /api/url2jpg with the target URL as the body. Optional query parameters width and height control the viewport resolution (default: browser default). The function renders the page with Playwright (including JavaScript) and returns a JPEG image. Full-page captures available for documentation.

Is there a free serverless data conversion API?
SIMS Azure Convert Functions is open source and can be deployed on your own Azure subscription. Azure Functions includes a generous free tier: 1 million requests per month and 400,000 GB-seconds of execution. For most use cases, the conversion API runs essentially free. You only pay when you exceed the free tier limits.

How to convert Markdown to HTML with an API?
POST your Markdown content to /api/md2html. The function generates a full HTML document with CSS styling, supporting tables, code blocks, lists, and other Markdown features. Optional content sanitization is available for security when rendering user-provided content.

📞 Contact & Support

For questions, contributions, or support:

  • Email: vhlu@sims-service.com
  • Website: https://sims-service.com

📄

Open Source

SIMS Azure Convert Functions is open source software. Deploy on your Azure subscription and get access to all data conversion capabilities through a simple REST API.

🔗 Resources

📂

GitHub Repository

Explore the complete source code, documentation, and latest releases on GitHub.

View on GitHub