Arrange existing tags in the tree

I have noticed that in recent versions tags can be put under a tree, as in folders. Now I want to edit all the old tags in neat wood, is there a way to do that?

You have to edit the tags manually (from the browser sidebar) if you don’t already use some separator to denote tag levels (e.g. using _ as in Math_Calculus). If you use a separator other than the :: used by Anki to recognize tag levels, then you can replace it using the Find and Replace feature.
Screenshot 2022-01-02 152722