All seventh chords, when inverted, contain a second somewhere in the stack of notes. Diminished sevenths are no different. Somewhere in the inversion will be an augmented second.1
Thus, one can tell the inversion in the same way as any other seventh chord:
- First inversion = 6-5-3 (the second is between 6 and 5)
- Second inversion = 6-4-3 (the second is between 4 and 3)
- Third inversion = 6-4-2 (the second is between 2 and 1)
As an example, consider Adim7 and Cdim7. Both chords contain the same keys on the keyboard. However, the spellings are different, and therefore the inversion also clear.
- Cdim7 in root position = C-Eb-Gb-Bbb (all minor thirds)
- Adim7 in first inversion = C-Eb-Gb-A (augmented second between Gb and A)
Where there can be genuine confusion is when diminished sevenths are "misspelled". This can happen for two reasons.
- The chord is being used to pivot between two keys, so it's correctly spelled only relative to one of those keys.
- The chord is easier to read if written enharmonically.
For an example of (1), see How to analyze mm. 5-8 in the first movement of Beethoven Piano Sonata No. 8.
For an example of (2), see What's the Reason for Naming Major Second a Diminished Third?.
1. An implicit assumption is made, for the purposes of this post, that chords are in close position.