# User Export/Import JSON Issues

**URL:** <https://community.auth0.com/t/user-export-import-json-issues/59895>\
**Category:** Get Help\
**Created:** [March 22, 2021, 10:37pm UTC](https://community.auth0.com/t/user-export-import-json-issues/59895 "2021-03-22T22:37:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beanie](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/beanie/32/13031_2.png) [@Beanie](https://community.auth0.com/u/Beanie)\
**Post date:** [March 22, 2021, 10:37pm UTC](https://community.auth0.com/t/user-export-import-json-issues/59895/1 "2021-03-22T22:37:16Z")

</div>

Not sure if im doing something wrong but when I create a user export, using either the dashboard extension or the jobs api endpoint, the resulting json file is not valid. Instead of having an array of user objects it has multiple user objects in the root.  
So when I try and upload the same file to a different tenant Auth0 says Users import failed with a message Failed to parse users file JSON when importing users. Make sure it is valid JSON.

Shouldnt a file exported from Auth0 be able to be imported?

---

<div class="post-metadata">

**Author:** ![ricardo.batista](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ricardo.batista/32/7711_2.png) [@ricardo.batista](https://community.auth0.com/u/ricardo.batista)\
**Post date:** [March 23, 2021, 8:25am UTC](https://community.auth0.com/t/user-export-import-json-issues/59895/2 "2021-03-23T08:25:43Z")

</div>

Hi @Beanie

The export is done in the ndjson format, but the import requires a properly formatted json. Before you can import users, you’ll need to convert from **ndjson** to **json,** as stated here [User Import / Export Extension](https://auth0.com/docs/extensions/user-import-export-extension#export-users)

> Auth0 uses the [ndjson](http://ndjson.org/) format due to the large size of export files

Regarding the conversion from ndjson to json, you can use the jq library [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/) as:

`cat input.json | jq -s > output.json`

It will convert the ndjson file you get from the extension:

```
{"user_id": ...}
{"user_id": ...}
{"user_id": ...}

```

Into a valid json file:

```
[
  {"user_id": ...},
  {"user_id": ...},
  {"user_id": ...}
]

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 7, 2021, 8:26am UTC](https://community.auth0.com/t/user-export-import-json-issues/59895/3 "2021-04-07T08:26:28Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
