# how to convert an inventory file/directory into json format?

**URL:** <https://forum.ansible.com/t/how-to-convert-an-inventory-file-directory-into-json-format/21929>\
**Category:** Ansible Project\
**Created:** [July 6, 2016, 3:19am UTC](https://forum.ansible.com/t/how-to-convert-an-inventory-file-directory-into-json-format/21929 "2016-07-06T03:19:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aneesh\_Joseph](https://avatars.discourse-cdn.com/v4/letter/a/5fc32e/32.png) [@Aneesh\_Joseph](https://forum.ansible.com/u/Aneesh_Joseph)\
**Post date:** [July 6, 2016, 3:19am UTC](https://forum.ansible.com/t/how-to-convert-an-inventory-file-directory-into-json-format/21929/1 "2016-07-06T03:19:30Z")

</div>

Hi all,  
Is there a quick clean way to convert an inventory file/directory into json format which can then be fed in as a dynamic inventory (with some tweaks to the json)

Thanks,  
Aneesh
