Format detector