JSON To INI

Login

Email
Password

Don't have an account yet?

Go to Sign up

Input Data
Sample {{ showCoderInput ? 'Choose File' : 'Enter Data' }}

                                
Valid JSON Invalid JSON — Cannot convert to JSON Array
Output Data
{{ copied ? 'Copied!' : 'Copy to Clipboard' }} Download File
Properties
Convert JSON Array to INI online — paste, edit, and download INI.

Convert Restart

JSON to INI — Free Online INI Configuration File Generator

What Is the INI File Format?

INI is a configuration file format consisting of sections, keys, and values. It has no formal specification but follows de facto conventions dating back to MS-DOS (Windows 3.x win.ini, system.ini).

[database]
host = localhost
port = 3306
name = myapp_production

[
server]
host = 0.0.0.0
port = 8080
debug = false

[
logging]
level = info
file = /var/log/myapp.log

INI Format Structure

ElementSyntaxExample
Section[section_name][database]
Key-value pairkey = valuehost = localhost
Comment; comment or # comment; production config
Blank line(empty)Between sections

INI Format Rules

  • Sections are declared in square brackets: [section]

  • Keys and values are separated by = (or sometimes :)

  • Comments start with ; or #

  • Sections group related keys

  • Keys must be unique within a section

  • Values are always strings (no formal type system)

  • Duplicate sections are typically merged by parsers

What Is JSON?

JSON (JavaScript Object Notation) is a lightweight, human-readable text format defined by RFC 8259. It supports nested objects, arrays, and typed values (strings, numbers, booleans, null).

JSON vs. INI — Key Differences

FeatureJSONINI
StructureHierarchical (nested objects/arrays)Flat sections with key-value pairs
TypesString, number, boolean, null, array, objectString only (parsers may interpret)
NestingArbitrary depthOne level of sections
CommentsNot supported; or #
ArraysSupportedNot natively supported
Null valuesnullNot supported
StandardRFC 8259No formal spec
Primary useAPIs, data interchange, config (modern)Configuration files (legacy/ desktop)
File extension.json.ini

JSON-to-INI Conversion Logic

The conversion maps JSON objects to INI sections and key-value pairs:

JSON StructureINI Output
Top-level object keys with string/number/boolean valuesKeys in a [General] section (or first section)
Nested JSON object {...}New INI [section]
Nested key-value pairs within an objectkey = value pairs within that section
Arrays [...]Serialized as comma-separated or multi-line values
nullEmpty value or string "null"
Boolean true/falseString "true"/"false"

Input JSON:

{
   "database": {
       "host": "localhost",
       "port": 3306,
       "name": "myapp"
   },
   "server": {
       "host": "0.0.0.0",
       "port": 8080,
       "debug": false
   }
}

Output INI:

[database]
host = localhost
port = 3306
name = myapp

[
server]
host = 0.0.0.0
port = 8080
debug = false

Why Convert JSON to INI?

Use CaseDescription
PHP configurationConvert JSON config to INI for parse_ini_file() compatibility
Python appsGenerate .ini files for configparser
Git configurationConvert JSON to .gitconfig format
Game moddingGenerate game configuration files from structured data
Desktop applicationsMany Windows/Linux desktop apps use INI for settings
Legacy system migrationConvert modern JSON config to legacy INI format
Docker / containerizationSome container entrypoints expect INI configs
Embedded systemsMicrocontrollers and IoT devices often use INI for settings

Where INI Files Are Used

System / ApplicationINI FilePurpose
PHPphp.iniPHP runtime configuration
Git.gitconfigGit user settings, aliases, preferences
Pythonconfigparser filesApplication configuration
Windowsdesktop.ini, boot.iniOS and application settings
MySQLmy.ini / my.cnfDatabase server configuration
Supervisorsupervisord.confProcess manager configuration
Sambasmb.confFile sharing configuration
PuTTYSession .ini filesSSH client sessions
Game enginesVarious .ini filesGraphics, audio, gameplay settings
Mercurial.hgrcVersion control configuration
AWS CLI~/.aws/configAWS profile configuration (INI-like)
systemd.service filesService unit configuration (INI-like)

Core Features

1. Dual Input Modes

  • File Upload: Drag and drop or select a .json file.

  • Code Editor: Paste or type raw JSON with syntax highlighting and real-time validation.

2. Automatic Section Detection

Nested JSON objects are automatically converted to INI [sections]. Top-level keys with primitive values are placed in a default section.

3. Privacy by Design

All processing runs entirely in your browser. No data is uploaded to any server.

How to Use This JSON to INI Converter

Step 1: Provide Your JSON Data

Choose one of two input methods:

  • Upload a file: Click "Choose File" and select a .json file, or drag it into the upload area.

  • Paste data: Click "Enter Data" to switch to the code editor. Paste your JSON. A "Valid JSON" badge confirms correct formatting.

Step 2: Convert

Click Convert. The INI output appears in the "Output Data" panel.

Step 3: Copy or Download

  • Click Copy to Clipboard to paste into a .ini file.

  • Premium users can click Download File to save.

Complete Example

Example — Application Config

Input JSON:

{
   "database": {
       "host": "localhost",
       "port": 5432,
       "name": "myapp_production",
       "user": "admin",
       "password": "secret",
       "pool_size": 10
   },
   "server": {
       "host": "0.0.0.0",
       "port": 8080,
       "debug": false,
       "cors_origins": "*"
   },
   "logging": {
       "level": "info",
       "file": "/var/log/myapp.log",
       "max_size_mb": 100,
       "rotate": true
   }
}

Output INI:

[database]
host = localhost
port = 5432
name = myapp_product
ion
user = admin
password = secret
pool_size = 10

[
server]
host = 0.0.0.0
port = 8080
debug = false
cors_origins = *

[
logging]
level = info
file = /var/log/myapp.log
max_size_mb = 100
rotate = true

Example — Flat Key-Value Config

Input JSON:

{
   "app_name": "MyApp",
   "version": "2.1.0",
   "environment": "production",
   "max_connections": 100,
   "timeout_seconds": 30
}

Output INI:

app_name = MyApp
version = 2.1.0
environment = production
max_connections = 100
timeout_seconds = 30

Example — PHP-style Configuration

Input JSON:

{
   "PHP": {
       "engine": "On",
       "short_open_tag": "Off",
       "precision": 14,
       "output_buffering": 4096,
       "max_execution_time": 30,
       "memory_limit": "256M",
       "error_reporting": "E_ALL",
       "display_errors": "Off",
       "log_errors": "On"
   },
   "Date": {
       "timezone": "UTC"
   },
   "Session": {
       "save_handler": "files",
       "save_path": "/tmp",
       "use_strict_mode": "1",
       "cookie_httponly": "1",
       "cookie_secure": "1",
       "gc_maxlifetime": 3600
   }
}

Output INI:

[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
max_execution_time = 30
memory_limit = 256M
error_reporting = E_ALL
display_errors = Off
log_errors = On

[
Date]
timezone = UTC

[
Session]
save_handler = files
save_path = /tmp
use_strict_mode = 1
cookie_httponly = 1
cookie_secure = 1
gc_maxlifetime = 3600

Example — Git Configuration

Input JSON:

{
   "user": {
       "name": "John Doe",
       "email": "[email protected]"
   },
   "core": {
       "editor": "vim",
       "autocrlf": "input"
   },
   "push": {
       "default": "simple"
   },
   "alias": {
       "st": "status",
       "co": "checkout",
       "br": "branch"
   }
}

Output INI:

[user]
name = John Doee
mail
= [email protected]

[
core]
editor = vim
autocrlf = input

[
push]
default = simple

[
alias]
st = status
co = checkout
br = branch

INI Format Limitations

LimitationDescription
Flat structureOnly one level of sections — no deeply nested data
No arraysArrays must be serialized as comma-separated strings
String values onlyNo type system — all values are strings
No nullINI has no null concept
No standard specDifferent parsers handle edge cases differently
Special charactersValues containing = or ; may need quoting

Frequently Asked Questions (FAQ)

  • Does the tool upload my data?

    No. All conversion happens locally in your browser using JavaScript. Your data never leaves your device.

  • What is the INI file format?

    INI is a configuration file format with [sections] and key = value pairs. It is used by PHP, Python, Git, MySQL, Windows applications, and many other systems for settings and configuration.

  • How does the conversion work?

    Top-level JSON keys with primitive values become key-value pairs. Nested JSON objects become INI [sections] with their keys as key-value pairs inside each section.

  • Can I convert nested JSON objects?

    One level of nesting maps cleanly to INI sections. Deeply nested objects (objects within objects within objects) cannot be fully represented in INI's flat section structure.

  • What happens to JSON arrays?

    Arrays are serialized as comma-separated values in the INI output.

  • What happens to JSON booleans and nulls?

    Booleans become string values (true / false). Nulls become empty values.

  • What input format is required?

    Valid JSON — either an object or an array. Objects produce the most natural INI output with sections.

  • Is there a file size limit?

    The tool processes data entirely in your browser. Files up to 10 MB typically convert without issues on modern hardware.

  • Can I use this on mobile?

    Yes. The tool is responsive and works on smartphones and tablets.

Featured Tools

Featured tools that you might find useful.

Popular Tools

List of popular tools that users love and frequently use.

New Tools

The latest tools added to our collection, designed for you.

Topics

The tools grouped by topics to quickly find what you need.
Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.

Excel To JSON

Free online Excel to JSON converter. Transform XLSX, XLS, XLSM files into JSON arrays, objects, or keyed formats instantly in your browser — no upload, 100% private.
Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.

Excel To CSV

Free Excel to CSV converter. Convert XLSX, XLS, XLSM to CSV instantly in your browser. No upload, 100% private. Edit, transpose, deduplicate before exporting.
Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.

Excel To SQL

Free online Excel to SQL converter. Generate CREATE TABLE and INSERT statements from spreadsheets for MySQL, PostgreSQL, SQLite, and SQL Server. Supports batch insert, primary keys, and type inference.
Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.

Excel To ASCII Table

Free online Excel to ASCII table converter with 10 border styles (MySQL, Unicode, reStructuredText, and more). Add code comment wrappers in 8 languages. Supports text alignment. Client-side processing.