Конвертер INI в JSON
Гид
Конвертер INI в JSON
Convert INI configuration files to structured JSON instantly. Paste INI data with sections, key-value pairs, and comments — get clean JSON output with sections as nested objects. Supports type coercion, comment stripping, duplicate key handling, and dot-notation subsections.
Как использовать
Paste your INI configuration data into the input area. Sections like [database] become nested JSON objects, and key-value pairs become properties within those objects. Enable type coercion to automatically convert numeric strings, booleans, and null values. The JSON output updates instantly — copy it with one click or download the file.
Функции
- Section Nesting – INI sections like [database] become nested JSON objects. Dot-notation sections like [database.primary] create deeply nested structures automatically.
- Type Coercion – Automatically converts “true”/”false” to booleans, numeric strings to numbers, and “null” to null values instead of keeping everything as strings.
- Comment Stripping – Removes lines starting with ; or # (standard INI comment styles) for clean output.
- Duplicate Key Handling – Choose between “last wins” (standard INI behavior) or collecting duplicate keys into arrays.
- Quoted Value Support – Strips surrounding single or double quotes from values automatically.
- Настраиваемый отступ – 2 spaces, 4 spaces, tabs, or minified output.
- Конвертация в реальном времени – Вывод обновляется мгновенно при вставке данных или изменении любой опции.
Когда использовать этот инструмент
Use this tool when migrating application configurations from INI format to JSON, converting php.ini or my.cnf settings for documentation, transforming git config files for processing in JavaScript or Python applications, or when you need to quickly inspect and restructure INI data. It’s especially useful for DevOps engineers, system administrators, and developers working with legacy configuration formats.
Часто задаваемые вопросы
-
What is an INI file?
An INI file (initialization file) is a simple text-based configuration format used by many applications and operating systems. It consists of sections (marked with [brackets]), key-value pairs (key = value), and comments (lines starting with ; or #). INI files have been used since the earliest versions of Windows and remain common in PHP (php.ini), MySQL (my.cnf), Git (.gitconfig), and many other tools.
-
How are INI sections converted to JSON?
Each INI section becomes a nested JSON object. For example, [database] with host = localhost and port = 3306 becomes {"database": {"host": "localhost", "port": 3306}}. Dot-notation sections like [database.primary] create deeper nesting: {"database": {"primary": {...}}}. Keys defined before any section appear at the root level of the JSON object.
-
What is type coercion in INI to JSON conversion?
INI files store all values as strings, but JSON supports multiple data types. Type coercion automatically detects and converts values to appropriate JSON types: numeric strings become numbers (42 instead of "42"), "true" and "false" become booleans, and "null" becomes a JSON null value. This produces cleaner, more usable JSON output. You can disable type coercion if you want all values preserved as strings.
-
How does the tool handle duplicate keys?
INI files sometimes contain duplicate keys within the same section. The tool offers two strategies: 'Last wins' (the default INI behavior, where the last value for a duplicate key overwrites earlier ones) and 'Collect as array' (where duplicate keys are gathered into a JSON array, preserving all values). Choose the strategy that matches how your application interprets the INI file.
Установите наши расширения
Добавьте инструменты ввода-вывода в свой любимый браузер для мгновенного доступа и более быстрого поиска
恵 Табло результатов прибыло!
Табло результатов — это интересный способ следить за вашими играми, все данные хранятся в вашем браузере. Скоро появятся новые функции!
Подписаться на новости
все Новые поступления
всеОбновлять: Наш последний инструмент был добавлен 26 марта 2026 г.
