Decode id