I'm not aware of specialized tools for this. The fastest way to get it done will depend on what process you use for export (you export directly from Discourse? or from a tool like Edgesense with its own secondary database?).
So if you have a script already that creates the JSON output, you could add a function there. If you use a standard tool to export from your database to JSON, it may be faster to create a field with a random ID to the user records there.