For macOS 10.10 and later only. This script will remove any number of extra space characters at the beginning and ending of chosen tags (Name, Artist, Album Artist, Album, Composer, Genre, Grouping, Movement, Work and Show) in the selected tracks.
Select some tracks and launch the script. Checkmarked tags are remembered between launches.
Perhaps Also of Interest...
downloaded 23m 20s ago
Recreate a playlist such that its visible columns mirror the Music library
downloaded 23m 43s ago
Delete files downloaded and cached by Apple Music
downloaded 29m 47s ago
Perform tasks on a batch of playlists; rename, delete, duplicate, merge, more
downloaded 52m 20s ago
Delete characters from the beginning or ending of selected tracks' name, artist, album, comments, composer, or show tags
downloaded 53m 12s ago
Create a playlist for each entry of a specified tag
downloaded 1h 13m 31s ago
Exports and then re-imports selected tracks' artwork