Free online JSON object flattener. Just load your JSON object containing more nested objects in the input field and it will automatically get converted into a flat properties-like object. In the tool options, you can customize the flattening depth (how many levels of nesting to flatten) and the symbol used to join keys from different levels of flattened objects. Also, you can prettify or minify the output JSON. Created for developers by developers from team Browserling.
Free online JSON object flattener. Just load your JSON object containing more nested objects in the input field and it will automatically get converted into a flat properties-like object. In the tool options, you can customize the flattening depth (how many levels of nesting to flatten) and the symbol used to join keys from different levels of flattened objects. Also, you can prettify or minify the output JSON. Created for developers by developers from team Browserling.
This tool converts nested JSON objects into a single-level JSON object. This operation is called object flattening, and in essence, it reduces the depth and dimension of a JSON object. When a JSON object is flattened, its inner objects get joined with objects from the previous nesting levels. The resulting JSON object is similar to a properties file, where configuration options are joined via a dot. The program accepts a JSON object containing more nested objects as input, recursively traverses this data structure, extracts nested properties and values from it, and combines them together. After flattening, the hierarchical structure of the original object is eliminated, making it easier to read and simpler to edit. When flattening nested objects, keys from different depth levels are combined together via the specified join symbol. This symbol is a dot "." by default but it can be changed in the options. The "Flatten Depth" option allows you to control the amount of flattening. You can change it to a value greater than or equal to 1 in this option to specify how deep the nested objects should be flattened. Entering an asterisk "*" flattens objects at all levels, creating a single-level output object with all keys merged via the join symbol. The tool also provides options for controlling the indentation and compactness of the output JSON. You can choose between space indentation, tab indentation, or no indentation at all, which will minify the flattened JSON. If you're using space indentation, then you can also specify the number of spaces for each indentation level (by default, it's 2 spaces). If you're working with arrays and not objects, then you can use our Flatten a JSON Array tool to convert multi-level arrays into single-level arrays. Json-abulous!
This tool converts nested JSON objects into a single-level JSON object. This operation is called object flattening, and in essence, it reduces the depth and dimension of a JSON object. When a JSON object is flattened, its inner objects get joined with objects from the previous nesting levels. The resulting JSON object is similar to a properties file, where configuration options are joined via a dot. The program accepts a JSON object containing more nested objects as input, recursively traverses this data structure, extracts nested properties and values from it, and combines them together. After flattening, the hierarchical structure of the original object is eliminated, making it easier to read and simpler to edit. When flattening nested objects, keys from different depth levels are combined together via the specified join symbol. This symbol is a dot "." by default but it can be changed in the options. The "Flatten Depth" option allows you to control the amount of flattening. You can change it to a value greater than or equal to 1 in this option to specify how deep the nested objects should be flattened. Entering an asterisk "*" flattens objects at all levels, creating a single-level output object with all keys merged via the join symbol. The tool also provides options for controlling the indentation and compactness of the output JSON. You can choose between space indentation, tab indentation, or no indentation at all, which will minify the flattened JSON. If you're using space indentation, then you can also specify the number of spaces for each indentation level (by default, it's 2 spaces). If you're working with arrays and not objects, then you can use our Flatten a JSON Array tool to convert multi-level arrays into single-level arrays. Json-abulous!
In this example, we're working with a JSON object containing information about Mars and Jupiter. The information includes their properties, such as moons and temperature. The tool flattens this data structure to a single level, creating a properties-like object. It uses a period (".") as the key joining symbol and adds two spaces of indentation for better readability.
In this example, we flatten a JSON object from a hotel database. It contains data about a particular hotel, its location, and various room types (single and double). The tool flattens the data by one level (depth level is set to "1" in the options) and uses an underscore ("_") to join keys. As a result, the original three-dimensional JSON object is converted into a two-dimensional JSON object, and it's prettified in the output via tab indentation.
In this example, we load a multi-level JSON object from a game. It represents a compass with directions (north, east, south, west) and their degrees. We use full depth flattening by entering an asterisk ("*") in the maximum recursion option to traverse all nested objects. The keys of all objects are joined via a hyphen ("-").
You can pass input to this tool via ?input query argument and it will automatically compute output. Here's how to type it in your browser's address bar. Click to try!
Find keys and/or values that interest you in a JSON file.
Create a text list from a JSON array or object.
Create a JSON array from a text list.
Generate HTTP form data from a JSON object.
Generate JSON object from HTTP form data.
Create a HTML table from keys and values of a JSON object.
Convert a JSON file to a CSON file.
Convert a CSON file to a JSON file.
Convert a JSON config to a TOML config.
Convert a TOML file to a JSON file.
Convert a JSON data structure to Bencode encoding.
Convert Bencode data to JSON data.
Convert a JSON file to a JSONL file.
Convert a JSONL file to a JSON file.
Convert binary JSON data structure (BSON) to JSON.
Convert a JSON file to a universal binary JSON (UBJSON).
Convert universal binary JSON (UBJSON) to regular JSON.
Serialize JSON data to binary MessagePack format.
Unserialize binary MessagePack to a JSON struct.
Serialize JSON data to binary Protobuf format.
Unserialize binary Protobuf to a JSON struct.
Generate a LaTeX table from a JSON object.
Convert a JSON data file to an INI configuration file.
Convert an INI configuration file to JSON data file.
Loop over JSON structure and truncate all values or keys.
Find the nesting depth of a JSON data structure.
Convert a JSON data structure to a data URL.
Create a PHP data structure from a JSON data structure.
Create a JSON data structure from a PHP data structure.
Diff JSON files and show differences visually.
Lexicographically sort the order of JSON object keys.
Exchange keys with values in a JSON file.
Create a JSON array with random values.
Create a JSON object with random keys and values.
Randomly change the positions of array elements.
Randomly change the order of key, value pairs.
Add random spaces and newlines in a JSON file.
Tokenize a JSON data structure.
Remove all JSON syntax and leave just the values.
Change curly braces, commas, and quotes to other symbols.
Fix incorrectly quoted (usually single quote) keys and values.
Make all keys and values in a JSON to be single-quoted.
Make all keys and values in a JSON to be double-quoted.
Create JSON that looks real but is fake (FakeSON).
Execute a jq query on a JSON data structure.
Filter keys and values that match a pattern.
Create a JSON array from a string.
Create groups of JSON array items.
Merge two or more JSON arrays together.
Find differences in two or more JSON arrays.
Merge two or more JSON objects together.
Introduce errors in a JSON data structure.
Try to fix a damaged JSON to the best of our ability.
Convert images to valid JSON strings that look like ASCII art.
Create an abstract visualization of JSON's complexity.
Subscribe to our updates. We'll let you know when we release new tools, features, and organize online workshops.
Enter your email here
We're Browserling — a friendly and fun cross-browser testing company powered by alien technology. At Browserling, our mission is to make people's lives easier, so we created this collection of JSON tools. Our tools have the simplest user interface that doesn't require advanced computer skills and they are used by millions of people every month. Behind the scenes, all JSON tools are actually powered by our web developer tools that we created over the last couple of years. Check them out!