ParseKeyValue
DataTools
Description
Turn Key=Value text into structured data! ParseKeyValue parses configuration files, environment variables, INI files, query strings and any key-value format - automatically and reliably. Manual mapping is a thing of the past!
With flexible delimiters, support for nested values, comment handling and type inference, you turn unstructured configurations into immediately usable JSON objects. Perfect for DevOps, system integration and configuration management!
Why This Tool Stands Out
- Automatic Parsing of INI, ENV, configs
- Flexible Delimiters - =, :, or custom
- Comment Handling - # and ; are ignored
- Type Detection - numbers, booleans automatically
Perfect for:
DevOps engineers, system administrators, backend developers and everyone who needs to process configurations. Ideal for .env files, INI parsers, query string processing, system configurations and properties files. Perfect for Docker Compose, Kubernetes, CI/CD pipelines and cloud configurations!
Workflow support; time savings depend on the task
Instead of parsing configuration files manually, mapping keys and converting values, ParseKeyValue instantly delivers a structured JSON object - ready for use in your application!
JSON Parameters
- text REQUIRED (String)The key-value text to parse. Can contain multiple lines.
- delimiter OPTIONAL (String)The delimiter between key and value. Default: "=". Alternatives: ":", " ", etc.
- ignoreComments OPTIONAL (Boolean)Whether lines starting with # or ; should be ignored as comments. Default: true
- trimWhitespace OPTIONAL (Boolean)Whether whitespace should be trimmed from keys and values. Default: true
- detectTypes OPTIONAL (Boolean)Whether values should be converted automatically to numbers/booleans. Default: true
Example Call
{
"tool": "ParseKeyValue",
"params": {
"text": "# Database configuration\nDB_HOST=localhost\nDB_PORT=5432\nDB_SSL=true\n\n# App settings\nAPP_NAME=MyApp\nAPP_DEBUG=false",
"delimiter": "=",
"ignoreComments": true,
"trimWhitespace": true,
"detectTypes": true
}
}
Example Usage
Load the content of your .env, INI or properties file.
Choose the appropriate delimiter and whether comments should be ignored.
Use the parsed object directly in your application or API.
Return Values
The tool returns an object with the following properties:
- data (Object)
The parsed key-value object - keyCount (Integer)
Number of parsed key-value pairs - keys (Array)
Array of all keys found - linesParsed (Integer)
Number of lines processed - success (Boolean)
True if parsing was successful - error (String, optional)
Error message if parsing failed
Related DataTools
Ready for More DataTools?
Discover all our data processing tools for efficient configuration management.
Explore All DataTools