🔑Key=Value to JSON Converter

Convert key=value pairs to JSON

How to use the key=value to JSON converter

Config notes, log lines and scraped form fields often arrive as a plain list of key=value pairs. Paste one pair per line and this tool turns the whole list into a JSON object. Blank lines are ignored, and leading or trailing spaces around both the key and the value are trimmed away.

Only the first = sign on each line is used as the separator. Any further = characters stay inside the value, so URLs, tokens and Base64 strings survive intact. A line with no = sign at all is skipped, and the number of skipped lines is reported above the result.

With the quote option on, one matching pair of wrapping double or single quotes is removed from the value. With the type option on, numbers plus true, false and null become real JSON values; turn it off and every value stays a string. When a key shows up more than once you can keep the last value, keep the first value, or collect every value into an array, and the label tells you which rule was applied.

Nesting is not created. Entering a.b=1 produces a single key named "a.b" rather than an object inside an object. Multi-line values and comments are not handled either. For an environment file with # comments and export prefixes, the dedicated .env converter is the accurate choice. Everything runs inside your browser and nothing is uploaded.

Frequently asked questions

Can the value itself contain an = sign?

Yes. Only the first = on the line acts as the separator, so every = after it stays inside the value untouched.

How do I keep a numeric-looking value as text?

Clear the type option. ZIP codes and phone numbers that start with a zero then stay strings instead of being converted to numbers.

Can a.b=1 become a nested object?

No. This tool never nests, so the dotted name becomes one flat key. Build the nested structure yourself after converting if you need it.